1 min readMay 23, 2018
setSupportActionBar()
can only be called with toolbar. I’ve just wrapped the toolbar with the BottomAppBar.
<android.support.design.bottomappbar.BottomAppBar
android:id="@+id/bottom_appbar"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_gravity="bottom"
app:backgroundTint="@color/colorPrimary"
app:fabAttached="true"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.design.bottomappbar.BottomAppBar>