yasszu / bottom-navigation

Example of Android BottomNavigationView
https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView
132 stars 17 forks source link
android bottom-navigation-view bottomnavigation bottomnavigationview bottomnavigationview-shift-mode kotlin

Bottom Navigation

This application is example of how to use BottomNavigationView.

Prerequisites

Getting Started

Build with the Android Studio Electric Eel | 2022.1.1 Patch 2

Disable shifting mode

Since Support library 28

    <android.support.design.widget.BottomNavigationView
        ・・・
        app:labelVisibilityMode="labeled"
        ・・・
    />

Support library 27 or lower (target-sdk-27)

Use the extension of BottomNavigationView.

bottomNavigationView.disableShiftMode()

You need to configure proguard-rules.pro file if you want use ProGuard. Such as below:

-keepclassmembers class android.support.design.internal.BottomNavigationMenuView { 
    boolean mShiftingMode; 
}