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
raajkumars
be616abf49
[internal] Moved common ids from bottom navigation to central location so that it can be reused.
...
PiperOrigin-RevId: 340255767
2020-11-03 11:11:54 -05:00
Material Design Team
cf9027f098
[TabLayout] Add a localized a11y string for a tab
...
PiperOrigin-RevId: 338706340
2020-10-23 12:31:51 -07:00
connieshi
9487c33b8a
Automated g4 rollback of changelist 336347365
...
PiperOrigin-RevId: 336978123
2020-10-15 13:23:56 -07:00
Material Design Team
0f717f8cce
Automated g4 rollback of changelist 336306885
...
PiperOrigin-RevId: 336347365
2020-10-15 13:01:02 -07:00
connieshi
5e35d14c18
[Badge] Update badge to support being anchored to any view in pre 18.
...
In <API18, BadgeDrawable will dynamically 1) wrap the anchor in a FrameLayout and 2) replace the anchor with the FrameLayout in the anchor' view hierarchy. BadgeDrawable will set itself as foreground on the FrameLayout.
If the user does not want BadgeDrawable to manipulate its view hierarchy, the user can pass in an instance of FrameLayout `customBadgeParent` in #attachBadgeDrawable instead.
Labeled BadgeUtils as experimental and removed the RestrictedTo(Scope.Library) annotation.
Updated TopAppBar main demo to show a badge on a toolbar menu item.
PiperOrigin-RevId: 336306885
2020-10-15 12:31:14 -07: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
hunterstich
8ec11a1460
[BottomNavigationView] Updated menu item selection animation to match spec
...
Bottom nav item labels now slide up when fading in instead of scaling.
PiperOrigin-RevId: 331163684
2020-09-11 14:51:00 -04:00
connieshi
e8e901ecd4
[BottomNavigation] When setting the CollectionItemInfo on a BottomNavigationItemView, figure out its position amongst the visible menu items instead of using its item position.
...
PiperOrigin-RevId: 328923164
2020-08-28 10:12:15 -04:00
dniz
cbc7af2054
[BottomNavigationView] Added setItemOnTouchListener method to support custom touch handling
...
PiperOrigin-RevId: 325814575
2020-08-10 13:25:26 -04:00
marianomartin
049ad022a6
Delete components build.gradle files
...
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07: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
Material Design Team
bcaca401c2
Fix the role description of the GMDC bottom navigation item view's accessibility node.
...
It was a raw string "Tab", which results in it being never translated. Thus, when Talkback announces the bottom navigation item in other languages, it still announces "Tab" in English.
PiperOrigin-RevId: 310158712
2020-05-07 11:55:49 -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
isabellekim
e7b729523b
Add public attributes to public.xml for bottom navigation and FAB.
...
PiperOrigin-RevId: 293649570
2020-02-07 10:30:17 -05:00
Material Design Team
f1053dfffb
Add roleDescriptions to tabs for accessibility
...
PiperOrigin-RevId: 292620627
2020-02-03 10:22:49 -05:00
Material Design Team
1febcf94b1
Automated g4 rollback of changelist 292560239
...
PiperOrigin-RevId: 292606404
2020-01-31 16:53:08 -05:00
Material Design Team
811ea17e60
Add roleDescriptions to tabs for accessibility
...
PiperOrigin-RevId: 292560239
2020-01-31 13:38:39 -05:00
Material Design Team
5de9f01ade
Move a11y delegate code from BottomNavigationView and TabLayout to onInitializeA11yNodeInfo.
...
PiperOrigin-RevId: 286929652
2019-12-23 15:44:28 -05:00
Material Design Team
cc9b9c1103
Add CollectionInfos and CollectionItemInfos to tabs for accessibility. Also make a tab non-clickable by a11y when it is selected.
...
PiperOrigin-RevId: 281785987
2019-11-22 21:25:50 +00: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
c14dee1440
Add null check before trying to find the item view associated with a badge id.
...
PiperOrigin-RevId: 261694373
2019-08-06 14:25:55 -04:00
connieshi
276bec8385
Update BottomNavigation to respect bottom system insets
...
PiperOrigin-RevId: 260031378
2019-07-29 16:35:59 -04:00
dniz
cc73c2a630
Update TODOs
...
PiperOrigin-RevId: 259535844
2019-07-23 11:21:39 -04:00
dniz
0512f776c5
Remove sub-package AndroidManifest.xml files from lib directory
...
PiperOrigin-RevId: 258390736
2019-07-16 13:18:32 -04:00
isabellekim
a628bf516b
Revert the library to compile with Java 7: revert lambdas, add necessary casts, and make some variables final.
...
Continue compile shrine demo, catalog, and tests with Java 8.
PiperOrigin-RevId: 257874888
2019-07-15 19:19:23 -04:00
Material Design Team
c42b77fdad
Do not unconditionally override icon tint in BottomNavigationItemView.
...
PiperOrigin-RevId: 257828981
2019-07-15 19:14:14 -04:00
dniz
68ddfee0ed
Remove Material's legacy androidx core_ui and core_utils dependencies in favor of more granular dependencies (coordinatorlayout, graphics, interpolator, customview)
...
PiperOrigin-RevId: 257452569
2019-07-10 15:17:12 -04:00
dniz
37534561f2
Add component styles that swap between primary and surface styles depending on light vs dark theme
...
Makes it easier for devs to implement: https://material.io/design/color/dark-theme.html#custom-application
PiperOrigin-RevId: 256208965
2019-07-03 14:11:49 -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
ataulm
c045cca69d
[BottomNavigation] Add tooltip fallback to Bottom Navigation item titles
...
Resolves https://github.com/material-components/material-components-android/pull/409
GIT_ORIGIN_REV_ID=c6cbfcc4ff9cf7c0fa48a929f7950848f5b9dd8e
PiperOrigin-RevId: 254824856
2019-06-24 17:33:01 -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