Я использую 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>
Чего не хватает?
попробуйте это - bottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED) @Sean
Если вы используете библиотеку поддержки 28 Попробуйте это,
app:labelVisibilityMode = "labeled"
Полный код
<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"
app:labelVisibilityMode = "labeled"
/>
проверьте это--> stackoverflow.com/questions/41718633/…