rightnao
2ebf28fdb5
[BottomNavigationView] Consume all touch events in BottomNavigationView so touch events are not passed to the view underneath
...
PiperOrigin-RevId: 703309708
2024-12-10 17:58:41 +00:00
pubiqq
23aca03255
[Internal] Remove pre-Lollipop checks
...
Resolves https://github.com/material-components/material-components-android/pull/4266
GIT_ORIGIN_REV_ID=1de7808e66dd6666c893217c76c7499afe2df6a3
PiperOrigin-RevId: 669688797
2024-09-03 13:31:29 +00:00
Material Design Team
3ea7709cff
[BottomNavigationView] Fixing bad link in class doc comment
...
PiperOrigin-RevId: 656464997
2024-07-30 09:04:02 -07:00
rightnao
3fbb198a1c
[BottomNavigationView] Update max item count to 6
...
PiperOrigin-RevId: 650353790
2024-07-08 20:34:03 +00:00
rightnao
60a525a167
[BottomNavigationView][NavigationRailView] Modifying NavigationBarView to match more to specs and restructuring layout to prepare for expressive changes
...
Changes:
- minHeight for BottomNavigationView is actually a minimum height, not an exact height; the bar height now wraps content properly
- For BottomNavigationView, bottom item padding now counts from the bottom of the label group instead of from the lowest label baseline. The label TextViews also have a min height of the line height supplied by the provided TextAppearance. This aligns with our m3 specs
- Structural changes in navigation item layouts. Previously the label and the icon were not aware of each other in a FrameLayout and could potentially overlap; this is no longer the case as they are in a LinearLayout
- padding between icon and label is 4dp as per specs
- Centering logic changed to center the icon and label as a group, not separately
PiperOrigin-RevId: 635922505
2024-05-23 14:54:36 +00:00
pubiqq
510881a469
[Internal] Stop using deprecated androidx.core.view.* methods
...
Resolves https://github.com/material-components/material-components-android/pull/4117
GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
Ga\u00ebtan Muller
b3fe6a7f61
[Cleanup] Remove redundant version checks for api <= 19.
...
Resolves https://github.com/material-components/material-components-android/pull/3849
GIT_ORIGIN_REV_ID=47bb2fcc8031740e5a7d4f741f1ada2af025e126
PiperOrigin-RevId: 632154861
2024-05-09 18:46:02 +00:00
rightnao
e3b255b3a0
[Docs] Crosslink github docs in javadocs
...
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
rightnao
e3937483c3
[BottomNavigationView] Remove elevation shadows
...
PiperOrigin-RevId: 483721316
2022-10-28 07:42:47 -07:00
Anyer Castillo
a2ce1dd102
[BottomNavigation] Fix hardcoded number of children
...
Resolves https://github.com/material-components/material-components-android/pull/2923
GIT_ORIGIN_REV_ID=54a68268367a3f0efda6928e10b5f9c299502121
Co-authored-by: imhappi
PiperOrigin-RevId: 475346937
2022-09-20 12:58:29 -04:00
Material Design Team
a487c89185
Internal change
...
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
Ian Lake
501ef8ea2a
[NavigationRailView] Update inset handling for Navigation Rail & Bottom Nav
...
Resolves https://github.com/material-components/material-components-android/pull/2253
GIT_ORIGIN_REV_ID=b6c2270b8855e38231c29cbfd48949afd785258c
PiperOrigin-RevId: 383632982
2021-07-08 16:01:01 +00:00
afohrman
720088c5c2
[BottomNavigationView] Added deprecation Javadoc for BottomNavigationView#OnNavigationItemSelectedListener and BottomNavigationView#OnNavigationItemReselectedListener.
...
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
2021-06-09 18:20:52 +00:00
hunterstich
943c4f0eed
[BottomNavigationView] Updated to explicitly read and set minimum height.
...
PiperOrigin-RevId: 368831987
2021-04-16 18:02:00 -04:00
hunterstich
7eea2b25bc
[Navigation bar] Add active indicator.
...
PiperOrigin-RevId: 368261456
2021-04-16 12:42:14 -04:00
Material Design Team
a200a5ef17
[NavigationRail] Moves OnNavigationItem listeners to the NavigationBarView class
...
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
2021-04-08 20:43:35 -04:00
dniz
fed90a9e57
[Nav Rail / Bottom Nav / Nav Bar] API Fixes
...
Resolves https://github.com/material-components/material-components-android/issues/2131
PiperOrigin-RevId: 365873683
2021-03-31 10:27:45 -04:00
raajkumars
aca5bfb6f7
[Bottom Navigation] Extracted common logic from bottom navigation component into navigation package.
...
PiperOrigin-RevId: 345029590
2020-12-02 09:55:26 -05:00
afohrman
9a5192ae5e
[BottomNavigationView] Updated BottomNavigationView to draw compat shadows and elevation overlays in pre-21 and remove top divider for non-legacy backgrounds.
...
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
2020-10-08 16:13:02 +00:00
dniz
cbc7af2054
[BottomNavigationView] Added setItemOnTouchListener method to support custom touch handling
...
PiperOrigin-RevId: 325814575
2020-08-10 13:25:26 -04:00
marianomartin
555356b03f
Internal cleanup
...
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
Material Design Team
073382034a
Migrate android.support.v4.content.ContextCompat to androidx
...
Android X migration
PiperOrigin-RevId: 315791679
2020-06-11 17:27:51 -07:00
Material Design Team
76ffe35fef
Cleanup
...
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -04:00
connieshi
5889993bb3
Update BottomNavigation to respect left/right system insets
...
PiperOrigin-RevId: 313180090
2020-05-26 16:00:06 -04:00
marianomartin
368b54c0ee
Fix setItemRippleColor links
...
PiperOrigin-RevId: 300799013
2020-03-13 16:01:11 -07:00
isabellekim
5ef93e9351
Javadoc updates for BottomNavigationView.
...
PiperOrigin-RevId: 300567464
2020-03-13 11:05:25 -04:00
connieshi
de005027bc
Fix bug in bottom navigation badge state restoration that did not set the badges on the menu item views.
...
Update catalog demo to save and restore states in the bottom navigation demos.
PiperOrigin-RevId: 278436621
2019-11-06 10:14:43 -05:00
marianomartin
56fbbe9ee5
Fix BottomNavigationView SavedState bug for null loader
...
Resolves https://github.com/material-components/material-components-android/issues/549
PiperOrigin-RevId: 278416562
2019-11-06 10:13:46 -05:00
marianomartin
115313c0c0
Expose a class for themeoverlay in style
...
This moves functionality from ThemeEnforcement into a stand alone class.
Resolves https://github.com/material-components/material-components-android/issues/665
PiperOrigin-RevId: 275481343
2019-10-21 10:24:19 -04:00
marianomartin
215a839598
Internal cleanup
...
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
marianomartin
0d4515cb46
Internal cleanup
...
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
cketcham
08a26c929e
Add @NonNull and @Nullable annotations
...
PiperOrigin-RevId: 264750215
2019-08-26 11:21:15 -04:00
connieshi
276bec8385
Update BottomNavigation to respect bottom system insets
...
PiperOrigin-RevId: 260031378
2019-07-29 16:35:59 -04:00
marianomartin
152f05adbc
Internal cleanup
...
PiperOrigin-RevId: 256180803
2019-07-03 14:09:17 -04:00
marianomartin
164bf0fabd
Internal cleanup
...
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
dniz
5df3bebd63
Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
...
Will follow-up with TabLayout absolute elevation separately
Resolves https://github.com/material-components/material-components-android/issues/381
PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00
marianomartin
2de39fafe0
Internal cleanup
...
PiperOrigin-RevId: 253799644
2019-06-18 13:57:49 -04:00
connieshi
ee913784dc
Rename BottomNavigationView#showBadge to BottomNavigationView#getOrCreateBadge(). No longer ensures that the badge is visible. User should call BadgeDrawable#setVisible(boolean).
...
PiperOrigin-RevId: 253231582
2019-06-18 13:28:31 -04:00
marianomartin
455ba2557b
Internal cleanup
...
PiperOrigin-RevId: 249490219
2019-05-24 14:22:06 -04:00
Material Design Team
3c5f9f6cb0
Migrate CoordinatorLayout android support libraries to androidx
...
PiperOrigin-RevId: 248819271
2019-05-21 12:03:28 -04:00
afohrman
d77864bbbf
Support ColorDrawables as the basis for MaterialShapeDrawable initialization in
...
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
2019-04-29 15:16:23 -07:00
connieshi
9d488d9208
Begin integrating BadgeDrawable into BottomNavigationView.
...
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
2019-04-19 21:51:25 -04:00
connieshi
7d8b2117a0
Automated g4 rollback of changelist 242675939
...
PiperOrigin-RevId: 242751222
2019-04-19 13:26:30 -04:00
connieshi
00ffe5eea8
Begin integrating BadgeDrawable into BottomNavigationView.
...
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
2019-04-19 13:21:35 -04:00
dniz
833258417d
Add @RequiresApi(VERSION_CODES.LOLLIPOP) to overriden setElevation() methods
...
that call super.setElevation()
PiperOrigin-RevId: 239171863
2019-03-22 16:50:21 -04:00
afohrman
d6cb34970a
Support elevation overlays for BottomNavigationView.
...
PiperOrigin-RevId: 238729801
2019-03-22 16:17:46 -04:00
isabellekim
6c3b51022e
Adds itemRippleColor attribute to the BottomNavigationView as an alternative for itemBackground to support using ripples based on theme attributes pre-23. And update BottomNavigationView ripples to match TabLayout ripples.
...
PiperOrigin-RevId: 235237859
2019-02-24 14:37:45 -05:00
marianomartin
6a7b1b2ce2
Mutate background drawable before changing tint
...
PiperOrigin-RevId: 226181425
2018-12-21 11:25:39 -05:00
cketcham
dc72aaeed4
Migrate Gradle build and sources to androidx
...
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
marianomartin
a083017520
Add backgroundTint support to BottomNav
...
PiperOrigin-RevId: 225384496
2018-12-21 10:41:14 -05:00