oneHamidreza / MeowBottomNavigation

Android Meow Bottm Navigation
http://etebarian.com
1.34k stars 200 forks source link

How to use navigation graph? #26

Closed Djafar-AML closed 4 years ago

Djafar-AML commented 5 years ago

Hi there, I just wanna use this just like android default bottomNavigation in my code: ------------------xml------------- <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottom_nav" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" app:labelVisibilityMode="labeled" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:menu="@menu/bottom_nav" />

------------------------activity-------------- navController = Navigation.findNavController(this , id.home_nav_host_fragment)

binding.bottomNav.setupWithNavController(navController)

NavigationUI.setupActionBarWithNavController(this , navController)

toshiro97 commented 5 years ago

because it extend framelayout so you can't use setupActionBarWithNavController