我正在使用android.support.design.widget.BottomNavigationView。除未选择时不显示标题外,其他都很好。
<!-- layout -->
<android.support.design.widget.BottomNavigationView
android:id="@+id/bnvBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@android:color/background_light"
android:theme="@style/BottomNavigationTheme"
app:menu="@menu/bottom_navigation_main" />
<!-- theme -->
<style name="BottomNavigationTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/orange</item>
</style>
缺少什么?
答案 0 :(得分:1)
如果您使用的是支持库28,请尝试
app:labelVisibilityMode="labeled"