Bottom Navigation View With Left Righ Space Issue

穿精又带淫゛_ 提交于 2020-05-26 19:26:19

问题


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


回答1:


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"



回答2:


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



来源:https://stackoverflow.com/questions/43777974/bottom-navigation-view-with-left-righ-space-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!