0

I have a simple material BottomAppBar with BottomNavigationView and I see a weird behaviour: every time it shows above the keyboard (the activity where this bar is added has android:windowSoftInputMode="adjustResize") the menu icons on that bar disappear. When keyboard is hidden - the icons are back. Any thoughts are appreciated enter image description here

<androidx.coordinatorlayout.widget.CoordinatorLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   android:id="@+id/parentCoordinatorLayout"
   android:layout_width="match_parent"
   android:layout_height="match_parent">

.....
    <com.google.android.material.bottomappbar.BottomAppBar
       android:id="@+id/bottomAppBar"
       android:layout_width="match_parent"
       android:layout_height="60dp"
       app:fabCradleMargin="10dp"
       app:fabCradleRoundedCornerRadius="0dp"
       app:fabCradleVerticalOffset="10dp">

       <com.google.android.material.bottomnavigation.BottomNavigationView
           android:id="@+id/bottomNavigationView"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:layout_marginEnd="16dp"
           app:menu="@menu/bottom_navigation" />

    </com.google.android.material.bottomappbar.BottomAppBar>

   <com.google.android.material.floatingactionbutton.FloatingActionButton
       android:id="@+id/profileCloseFab"
       android:layout_width="57dp"
       android:layout_height="57dp"
       android:contentDescription="@string/app_name"
       app:borderWidth="0dp"
       android:elevation="2dp"
       android:src="@drawable/ic_bottom_menu_fab_person_gray"
       app:layout_anchor="@id/bottomAppBar" />

</androidx.coordinatorlayout.widget.CoordinatorLayout >
Ross Stepaniak
  • 877
  • 1
  • 6
  • 22

1 Answers1

0

Can you try to use this? in your BottomNavigationView add this app:labelVisibilityMode="labeled" property.

   <android.support.design.widget.BottomNavigationView
     android:layout_width="match_parent"
     android:layout_height="56dp"
     android:layout_alignParentStart="true"
     android:layout_alignParentBottom="true"
     app:menu="@menu/nav_items" 
     app:labelVisibilityMode="labeled"/>
Kishan Thakkar
  • 619
  • 6
  • 11