7

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 enter image description here

Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
Dhara
  • 118
  • 1
  • 5

3 Answers3

16

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"
N J
  • 27,217
  • 13
  • 76
  • 96
EcoLover
  • 220
  • 3
  • 9
1

Solution

Inside BottomAppBar set attribute

android:padding="0dp"
Developer534255
  • 121
  • 1
  • 9
0

If there are fewer than three destinations, consider using tabs instead. In Bottom

  • If you want to implement the Bottom Navigation bar then from start or create a new project with navigation bar Activity , this activity give by default bottom navigation bar implemented...... Or follow this link http://stackoverflow.com/questions/36032177/android-new-bottom-navigation-bar – RAHUL JAIN May 05 '17 at 08:57