Dhara
Dhara

Reputation: 118

Bottom Navigation View With Left Righ Space Issue

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

Upvotes: 7

Views: 3531

Answers (3)

Developer534255
Developer534255

Reputation: 131

Solution

Inside BottomAppBar set attribute

android:padding="0dp"

Upvotes: 1

RAHUL JAIN
RAHUL JAIN

Reputation: 3

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

Upvotes: 0

EcoLover
EcoLover

Reputation: 220

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"

Upvotes: 16

Related Questions