I am newbie in android, i am use bottom navigation view with two menus
but im getting left right space
Here is my Navigation View,
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:itemBackground="@color/colorRed"
app:itemIconTint="@color/colorWhite"
app:itemTextColor="@color/colorWhite"
app:menu="@menu/bottom_bar_menu"/>
Please check Image
To create a Menu, first, create a Menu Directory by clicking on the app -> res(right-click) -> New -> Android Resource Directory and select Menu in the Resource Type. To create a Menu Resource File , click on the app -> res -> menu(right-click) -> New -> Menu Resource File and name it bottom_nav_menu.
Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.
According to Material design guidelines You can't use two menus with bottom navigation use, instead of bottomNavigation view use tab layout Check this link for guidlines https://material.io/guidelines/components/bottom-navigation.html#bottom-navigation-usage
Still, if you want to use bottom navigation view
Try This inside BottomNavigationView
android:background="@color/colorRed"
Solution
Inside BottomAppBar set attribute
android:padding="0dp"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With