mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
add new note from menu, remove fab. Fixes #52
This commit is contained in:
@ -39,12 +39,6 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
|
||||
pager_title_strip.setTextSize(TypedValue.COMPLEX_UNIT_PX, getTextSize())
|
||||
pager_title_strip.layoutParams.height = (pager_title_strip.height + resources.getDimension(R.dimen.activity_margin) * 2).toInt()
|
||||
|
||||
notes_fab.setOnClickListener { displayNewNoteDialog() }
|
||||
notes_fab.viewTreeObserver.addOnGlobalLayoutListener {
|
||||
val heightDiff = notes_coordinator.rootView.height - notes_coordinator.height
|
||||
notes_fab.visibility = if (heightDiff > dpToPx(200f)) View.INVISIBLE else View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
fun initViewPager() {
|
||||
@ -97,6 +91,10 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
displayOpenNoteDialog()
|
||||
true
|
||||
}
|
||||
R.id.new_note -> {
|
||||
displayNewNoteDialog()
|
||||
true
|
||||
}
|
||||
R.id.rename_note -> {
|
||||
displayRenameDialog()
|
||||
true
|
||||
|
Reference in New Issue
Block a user