Note: if you are upgrading from an older version of support library, do not forget to raise compile SDK version.
Check versions of support libraray here: Support Library versions
However, you may still get labelVisibilityMode not found message when compile, if your app depends on older versions of the design support library. If this is the case, try to upgrade to a version of the given dependency, that depends on at least the version of 28.0.0-alpha1 of design support library. If that's not possible, define the dependency explicitly.
If you use Gradle
You can check your depdendecies by
running dependencies task and search for the version number of com.android.support:design.
To add design support dependency explicitly in your build.gradle:
For updated answer using the default. Update to latest design library
and put to your BottomNavigationView xml attributes
you can put it also as programmatically
You can find source here BottomNavigationView
Hope this helps you.
Works for me
or
To disable the text animation and decrease font size use this in your dimens.xml file:
As others have pointed out, since support library 28.0.0-alpha1 it is possible:
or you can set it programatically.
Note: if you are upgrading from an older version of support library, do not forget to raise compile SDK version. Check versions of support libraray here: Support Library versions
However, you may still get labelVisibilityMode not found message when compile, if your app depends on older versions of the design support library. If this is the case, try to upgrade to a version of the given dependency, that depends on at least the version of 28.0.0-alpha1 of design support library. If that's not possible, define the dependency explicitly.
If you use Gradle
To add design support dependency explicitly in your build.gradle:
implementation 'com.android.support:design:28.0.0'
update your support library to 28.0.0.
If you are using support:design:28.0.0 add this line app:labelVisibilityMode="unlabeled" to your BottomNavigationView