Bottom app bar with center FAB

This commit is contained in:
J-Jamet committed 2020-08-09 14:25:22 +02:00
1 parent 9cdbe67cd4
commit a670006517
2 files changed
+6 -12

No files matched your search

@@ -31,7 +31,6 @@ import android.view.View
import android.widget.DatePicker
import android.widget.TimePicker
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.ActionMenuView
import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.widget.NestedScrollView
@@ -83,7 +82,7 @@ class EntryEditActivity : LockingActivity(),
private var coordinatorLayout: CoordinatorLayout? = null
private var scrollView: NestedScrollView? = null
private var entryEditContentsView: EntryEditContentsView? = null
private var entryEditAddToolBar: ActionMenuView? = null
private var entryEditAddToolBar: Toolbar? = null
private var validateButton: View? = null
private var lockView: View? = null
@@ -207,7 +206,7 @@ class EntryEditActivity : LockingActivity(),
entryEditContentsView?.setOnIconViewClickListener { IconPickerDialogFragment.launch(this@EntryEditActivity) }
// Bottom Bar
entryEditAddToolBar = findViewById(R.id.entry_edit_bottom_menu_bar)
entryEditAddToolBar = findViewById(R.id.entry_edit_bottom_bar)
entryEditAddToolBar?.apply {
menuInflater.inflate(R.menu.entry_edit, menu)
@@ -40,7 +40,6 @@
android:background="?attr/colorPrimary"
android:theme="?attr/toolbarAppearance"
android:popupTheme="?attr/toolbarPopupAppearance"
app:layout_scrollFlags="enterAlways|scroll|snap"
tools:targetApi="lollipop" />
</com.google.android.material.appbar.AppBarLayout>
@@ -65,18 +64,14 @@
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/entry_edit_bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:theme="@style/Widget.MaterialComponents.BottomAppBar"
android:backgroundTint="?attr/colorAccent"
app:backgroundTint="?attr/colorAccent"
app:fabAlignmentMode="end"
app:fabAlignmentMode="center"
app:hideOnScroll="true"
app:layout_scrollFlags="scroll|enterAlways"
android:layout_gravity="bottom" >
<androidx.appcompat.widget.ActionMenuView
android:id="@+id/entry_edit_bottom_menu_bar"
android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize"/>
</com.google.android.material.bottomappbar.BottomAppBar>
android:layout_gravity="bottom" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/entry_edit_validate"