【发布时间】:2022-07-03 22:24:18
【问题描述】:
我正在使用带有两个项目的 BottomNavigationView,但是,在平板电脑或横向上,它将两个图标都推到了中心。
我正在尝试与材料显示的相同间隔,但没有标签:
这是我的代码,有人知道是否有一个属性可以用来实现吗?
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/navigation_background"
app:itemIconTint="@color/navigation_icon_color_selector"
app:labelVisibilityMode="unlabeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_nav_menu" />
【问题讨论】:
-
在两个项目之间的菜单中添加一个虚拟项目
-
它仍然不会均匀分布
标签: android xml kotlin material-ui bottomnavigationview