20 Commits

Author SHA1 Message Date
rightnao
b184df6848 [NavigationBar] Add active indicator attributes to change active indicator height, width, and horizontal margins when it is in an expanded state (ie. when start icon gravity is set to 'start')
PiperOrigin-RevId: 657266378
2024-07-30 09:12:47 -07:00
rightnao
87ab6606fd [NavigationRail] Add an attribute to control how we measure the bottom padding of the navigation item
PiperOrigin-RevId: 640992331
2024-06-11 18:57:33 +00:00
rightnao
abb6e91a0a [NavigationBar] Add new itemIconGravity attribute
PiperOrigin-RevId: 638866190
2024-06-05 18:24:24 +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
pubiqq
0663019f45 [Color] Add ColorStateListDrawable support
Resolves https://github.com/material-components/material-components-android/pull/3538

GIT_ORIGIN_REV_ID=1bf9e320dc148e1bc959e7577372d3a393f35574
PiperOrigin-RevId: 563258432
2023-09-07 12:37:54 +00:00
rightnao
8b016a0e8b [NavigationRail][Badge] Added bigger padding in between items on the navigation rail when font scale is large so there is more room for the badges when they are forced inside the view bounds
Also fixed bug with navigation rail items moving when there is a badge vs when there is no longer a badge, and adds 4dp padding between icon container/active indicator and label text as per specs https://m3.material.io/components/navigation-rail/overview

PiperOrigin-RevId: 540349399
2023-06-14 12:47:57 -07:00
pfthomas
022e217770 [Navigation] Add itemTextAppearanceActiveBoldEnabled attr
Resolves https://github.com/material-components/material-components-android/issues/3191
Resolves https://github.com/material-components/material-components-android/issues/3293

PiperOrigin-RevId: 539977391
2023-06-14 15:14:24 +00:00
rightnao
7bd9724078 [BottomNavigationView] Integrate tokens and add shape appearance support
PiperOrigin-RevId: 524919091
2023-04-19 13:53:26 -07:00
hunterstich
a4107b9072 Automated g4 rollback of changelist 499286690
PiperOrigin-RevId: 499947079
2023-01-10 02:42:19 -05:00
hunterstich
acfd97f7ac [NavigationBar][NavigationRail] Expose getMenuView
PiperOrigin-RevId: 499286690
2023-01-05 12:50:15 -05:00
hunterstich
11578b34f3 [NavigationBar][NavigationRail] Updated item ripple to be contained within active indicator shape when enabled.
PiperOrigin-RevId: 453449225
2022-06-07 18:49:19 -07:00
Material Design Team
cfc00aa5a3 Update android core class definitions across material
PiperOrigin-RevId: 414839941
2021-12-08 14:56:25 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
Material Design Team
c1f48a74c2 [NavigationBar] getPresenter update
PiperOrigin-RevId: 401843016
2021-10-11 10:59:53 -04: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
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