I Cant Use Labelvisibilitymode
I dont understand even i already added dependency design why ouccured this happen?
Solution 1:
Try to used new material.io 2.0 and androidx.. Try this code..
<?xml version="1.0" encoding="utf-8"?><androidx.constraintlayout.widget.ConstraintLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:fitsSystemWindows="true"android:layout_height="match_parent"><includeandroid:id="@+id/amToolbar"layout="@layout/app_toolbar"
/><FrameLayoutandroid:id="@+id/activity_main_container"android:layout_width="match_parent"android:layout_height="0dp"app:layout_behavior="@string/appbar_scrolling_view_behavior"app:layout_constraintTop_toBottomOf="@+id/amToolbar"app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
/><com.google.android.material.bottomnavigation.BottomNavigationViewandroid:id="@+id/bottom_navigation"android:layout_width="match_parent"android:layout_height="wrap_content"app:labelVisibilityMode="labeled"app:layout_constraintBottom_toBottomOf="parent"app:menu="@menu/bottom_menu" /></androidx.constraintlayout.widget.ConstraintLayout>
Refer this link https://material.io/design/components/bottom-navigation.html
Solution 2:
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"android:layout_height="wrap_content"app:labelVisibilityMode="unlabeled"/>
Please use this above code for the labelVisibilityMode Also add this dependancy in app level gradle
implementation 'com.google.android.material:material:1.0.0-alpha3'
Post a Comment for "I Cant Use Labelvisibilitymode"