The listeners were deprecated in favor of `NavigationBarView#OnItemSelectedListener` and `NavigationBarView#OnItemReselectedListener`, but deprecation documentation was never added, so it's unclear what developers should use instead.
Also removed internal usages of these deprecated usages in the catalog and in tests.
PiperOrigin-RevId: 378021534
to be easier used by developers and other libraries
An example of where the current implementation fails is in Jetpack Navigation component where we rely on setOnNavigationItemSelectedListener and the similar methods in NavigationBarView (setOnItemSelectedListener) are protected.
PiperOrigin-RevId: 367467206
Previously, `BottomNavigationView` was using `MaterialShapeDrawable` but an elevation value that was set would not actually take effect. It turns out that this is because `BottomNavigationView` did not properly call the appropriate elevation methods. This commit fixes the handling of elevation. It also removes the top divider in pre-21 cases where there is a `MaterialShapeDrawable` background - otherwise the top divider is kept for compatibility with existing legacy versions.
PiperOrigin-RevId: 335867951
BottomNavigationView.
This commit removes backgroundTint from the BottomNavigationView styles and instead sets the respective default colors as ColorDrawable backgrounds of the BottomNavigationView. This allows BottomNavigationView to respect colors set in android:background without requiring the client to override backgroundTint.
PiperOrigin-RevId: 244669964
TODO:
- update javadocs to provide guidance on how to interact with BottomNavigation + Badging.
- Save badge states.
- Support displaying badges when bottom navigation item doesn't show an icon.
PiperOrigin-RevId: 244197244
TODO:
- update javadocs to provide guidance on how to call Badging API.
- Save badge states.
- Support displaying badges when bottom navigation item doesn't show an icon.
PiperOrigin-RevId: 242675939
This method does not provide clear value to the user. I considered deprecating it, but since it was introduced in an alpha release, it can just be deleted.
PiperOrigin-RevId: 193966844
The suffix makes it clearer that the attribute is boolean.
This attribute was introduced in an alpha release, so it is fine to rename.
PiperOrigin-RevId: 193964290
Update default icon size from 0dp to 24dp. 24dp is a more reasonable default to be used in cases where itemIconSize is not set in the theme or style provided.
PiperOrigin-RevId: 193675565