1 - Include Maven in your repository in build.gradle
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
2 - Place material components dependency in your build.gradle.
Keep in mind that material version is regularly updating.
implementation 'com.google.android.material:material:1.0.0-alpha1'
3 - Set compileSdkVersion, and targetSdkVersion to the latest API version targetting Android P which is 28.
4 - Make sure your app inherits Theme.MaterialComponents
theme in order to make BottomAppBar
use the latest style. Alternatively you can declare the style for BottomAppBar
in widget declaration within layout xml file as follows.
style=”@style/Widget.MaterialComponents.BottomAppBar”
5 - You can include BottomAppBar in your layout as follows. BottomAppBar must be a child of CoordinatorLayout.
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottom_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:backgroundTint="@color/colorPrimary"
app:fabAlignmentMode="center"
app:fabAttached="true"
app:navigationIcon="@drawable/baseline_menu_white_24"/>

6 - You can anchor a Floating Action Button (FAB) to BottomAppBar by specifying the id of the BottomAppBar in app:layout_anchor attribute of the FAB. BottomAppBar can cradle FAB with a shaped background or FAB can overlap BottomAppBar.
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/baseline_add_white_24"
app:layout_anchor="@id/bottom_app_bar" />
7 - There are many attributes you can use to configure the Bottom Nav Bar and the Fab Icon.

8 - Check this medium post for a more complete explanation.
UPDATE: Check the OP answer for the final solution for his particular problem.