2281 Commits

Author SHA1 Message Date
hunterstich
b762fbc2dd [Docs][NavigationRail] Updated documentation to Material 3 and added new styles/attrs to res-public
PiperOrigin-RevId: 398481584
2021-09-23 19:38:38 +00:00
dsn5ft
c40ac672d8 [M3][Docs] Updated Top App Bar dev doc to Material3 and added new styles/attrs to res-public
PiperOrigin-RevId: 398465771
2021-09-23 19:37:46 +00:00
conradchen
c3e8fa60f1 [M3][Dialog] Update M3 dialog paddings
PiperOrigin-RevId: 398262777
2021-09-23 19:25:58 +00:00
hunterstich
e8c1d98b16 [NavigationView] Added support for changing item size, divider insets, label insets, and corner size.
PiperOrigin-RevId: 398261933
2021-09-23 19:23:44 +00:00
Material Design Team
e89e46e046 [M3][Color] Hct update for gamut mapping.
When mapping colors from a perceptually accurate color space to RGB for display, we need to identify if the color clipped to RGB is close enough to the requested color, this change allows 1 part in 1 billion error.

PiperOrigin-RevId: 398195568
2021-09-23 19:22:09 +00:00
conradchen
4bec3e2b13 [AppBar] Fix incorrect scroll position after orientation changes
An app bar remembers the visible percentage of its first visible child during recreation to restore its scroll position. However, if an app bar is "fully" scrolled (scrolled to its maximum range), gets recreated, and changes its size after recreation, it can become not fully scrolled even if it keeps the same visible percentage of its first visible child, due to the difference in its own size. This can result in unexpected "gaps" in the layout due to inconsistency between AppBar layout's scroll position and the content view's.

Fixes this by remembering the "fully scrolled" state and restore it during recreation.

PiperOrigin-RevId: 398013525
2021-09-23 19:18:08 +00:00
conradchen
168c69189e [TimePicker] Add ability to customize positive and negative button
Resolves https://github.com/material-components/material-components-android/issues/2275

PiperOrigin-RevId: 398010381
2021-09-23 19:15:42 +00:00
hunterstich
c6d0f7c785 [M3][NavigationRail] Added new navigation rail styles.
PiperOrigin-RevId: 397846116
2021-09-21 08:35:12 -07:00
conradchen
328d269e6d [Tab] Fix NPE caused by null tab indicator
PiperOrigin-RevId: 397841987
2021-09-21 08:22:49 -07:00
conradchen
868f8aaba3 [Tab] Fix setting tab indicator and its full-width flag
1. When a new tab indicator drawable is set, we didn't correctly restore the previous set indicator height to the new drawable, or set the drawing bound to the intrinsic height of the drawable, if the indicator height was not specified. This result in a 0-height drawing bound after setting the tab indicator, which makes it disappear and can never go back if the tab indicator gravity is not "stretch" (which will recalculate the height after moving the indicator). Fixes this by correctly set the drawing bounds after a new tab indicator drawable is set.

2. After we set full-width flag of tab indicator, the width won't be updated until we move the tab indicator. Fixes this by explicitly triggering the recalculation of tab indicator's drawing bound after changing the flag.

Resolves: https://github.com/material-components/material-components-android/issues/2354
PiperOrigin-RevId: 397823617
2021-09-21 08:14:25 -07:00
conradchen
37bb2efb38 [Chip] Rollback workaround of ExploreByTouchHelper bug
The original bug has been fixed.

Resolves https://github.com/material-components/material-components-android/issues/2352

PiperOrigin-RevId: 397813859
2021-09-21 08:07:41 -07:00
jeremymuhia
3e7504f0db [M3][Divider] update divider dev doc
PiperOrigin-RevId: 397754423
2021-09-20 12:33:17 -07:00
conradchen
8a1f221e39 [Tab] Fix isSelected() may returns incorrect result
Resolves https://github.com/material-components/material-components-android/issues/2379

PiperOrigin-RevId: 397394397
2021-09-20 12:16:44 -07:00
serniebanders
10284bcf74 [M3][Docs] Update bottomsheet documentation to describe M3 themes/styles.
Additionally exposes M3 bottomsheet styles in res-public

PiperOrigin-RevId: 397125281
2021-09-20 11:49:12 -07:00
dsn5ft
445c4979b3 [M3][Top App Bar] Updated ActionBar and ActionMode styling
PiperOrigin-RevId: 397107223
2021-09-20 10:59:34 -07:00
jeremymuhia
83e240289e [M3][Badge] sync badge docs with implementation
PiperOrigin-RevId: 397106893
2021-09-20 10:58:52 -07:00
dsn5ft
67dbc21be1 [M3][Docs] Updated Getting Started guide to Material3 and added Material3 Theme resources to res-public
PiperOrigin-RevId: 397100754
2021-09-20 10:52:57 -07:00
hunterstich
674463fb6d [NavigationRail] Updated rail to support a minimum menu item height.
PiperOrigin-RevId: 397085204
2021-09-20 09:37:13 -07:00
pfthomas
00c0df9e7d [TimePicker][Accessibility] Send accessibility event when updating input mode
PiperOrigin-RevId: 397080648
2021-09-20 09:31:49 -07:00
pekingme
9c93dcd626 [M3][Tokens] Update resources to v0.47.
PiperOrigin-RevId: 397066722
2021-09-20 09:31:04 -07:00
jeremymuhia
785f5d4895 [M3][FAB] update FAB dev doc
PiperOrigin-RevId: 396900654
2021-09-16 13:35:27 -07:00
dsn5ft
333dceaa63 [M3][Docs] Updated Typography doc to Material3 and added Material3 Typography resources to res-public
PiperOrigin-RevId: 396876831
2021-09-16 13:13:45 -07:00
afohrman
3af8a93e18 [M3 Dialog] Set alert dialog icon size and color.
Icon size changed from 32dp to 24dp and icon color changed from ?attr/colorOnSurface to ?attr/colorSecondary.

PiperOrigin-RevId: 396847651
2021-09-16 13:04:48 -07:00
serniebanders
6a30ac164a [M3][Docs] Update tabs documentation to describe M3 themes/styles.
Additionally exposes M3 tabs styles in res-public

PiperOrigin-RevId: 396627778
2021-09-16 12:38:21 -07:00
conradchen
db699385b2 [M3][Theme] List widget style attributes to add to base themes
PiperOrigin-RevId: 396624457
2021-09-16 11:48:10 -07:00
pekingme
e9e393dcbc [M3][ProgressIndicator] Updated progress indicator dev doc with M3 themes/styles.
PiperOrigin-RevId: 396615622
2021-09-16 11:46:03 -07:00
dsn5ft
ec591e5420 [MaterialShapeDrawable] Open access to getResolvedTintColor() method
PiperOrigin-RevId: 396585644
2021-09-16 11:37:52 -07:00
pekingme
2161743bdc [LinearProgressIndicator] Improved the smooth transition from indeterminate mode to determinate mode for some APIs.
PiperOrigin-RevId: 396584016
2021-09-16 11:37:01 -07:00
pfthomas
5be9e50258 [M3][RadioButton] Update RadioButton dev docs with M3 themes/styles
PiperOrigin-RevId: 396443322
2021-09-16 11:36:12 -07:00
conradchen
62b8e15696 [M3][DatePicker] Add default calendar styles to M3 base themes
PiperOrigin-RevId: 396422498
2021-09-16 11:35:20 -07:00
pekingme
ad953814e9 [Theme] Added theme testing for MaterialComponents and added progress indicator styles in MaterialComponents dialog themes.
PiperOrigin-RevId: 396401732
2021-09-16 11:34:28 -07:00
conradchen
6626eed5c1 [M3][DatePicker] Update date picker dev doc with M3 themes/styles
Also adds missed text appearance attribute.

PiperOrigin-RevId: 396396263
2021-09-16 11:33:23 -07:00
conradchen
83e73de6b8 [M3][DatePicker] Update date picker title typography
PiperOrigin-RevId: 396385304
2021-09-16 11:32:42 -07:00
Material Design Team
1d3bb92cf0 [Color] Added APIs for color harmonization and role mapping utilities.
PiperOrigin-RevId: 396377046
2021-09-16 11:30:34 -07:00
pfthomas
7729ad4dff [M3][Button] Update button res-public
PiperOrigin-RevId: 395994178
2021-09-16 09:54:19 -07:00
pfthomas
3feb52af8a [M3][Checkbox] Update checkbox dev docs with M3 themes/styles
PiperOrigin-RevId: 395968902
2021-09-15 13:08:28 -07:00
serniebanders
ac66cd8cfb [M3][Docs] Update slider documentation to describe M3 themes/styles.
Additionally exposes M3 slider styles in res-public

PiperOrigin-RevId: 395957248
2021-09-15 12:56:46 -07:00
conradchen
764cd05b9d [M3][Snackbar] Update snackbar dev doc with M3 themes/styles
Also adds missed text appearance attribute.

PiperOrigin-RevId: 395951691
2021-09-15 12:45:45 -07:00
conradchen
06328c05ba [M3][TimePicker] Update time picker dev doc with M3 themes/styles
PiperOrigin-RevId: 395927842
2021-09-15 12:32:27 -07:00
afohrman
f01e6a849d [M3][Dialog] Add M3 styles for Dialog.
PiperOrigin-RevId: 395775598
2021-09-15 12:31:13 -07:00
serniebanders
227d489303 [M3][Docs] Update bottomappbar documentation to describe M3 themes/styles.
Additionally exposes M3 bottomappbar styles in res-public

PiperOrigin-RevId: 395771546
2021-09-15 12:29:05 -07:00
conradchen
0fbdedc9be [M3][TextField] Update text field dev doc with M3 themes/styles
PiperOrigin-RevId: 395758232
2021-09-15 12:27:48 -07:00
serniebanders
204eceb978 [M3][Docs] Update chip documentation to describe M3 themes/styles.
Additionally exposes M3 chip styles in res-public

PiperOrigin-RevId: 395730438
2021-09-15 12:26:01 -07:00
conradchen
063a17b9e9 [M3][Card] Update card dev docs with M3 themes/styles
PiperOrigin-RevId: 395726005
2021-09-15 12:23:49 -07:00
jeremymuhia
054f1dba1e [M3][FAB] add tertiary FAB color variant
PiperOrigin-RevId: 395721687
2021-09-15 12:22:52 -07:00
dsn5ft
96f41cb9a5 [M3][Shape] Update Shape dev docs with M3 themes/styles
PiperOrigin-RevId: 395703463
2021-09-15 12:21:33 -07:00
conradchen
fae2d9120f [M3][Snackbar] Remove redundant style settings
PiperOrigin-RevId: 395568908
2021-09-15 12:19:28 -07:00
conradchen
f3e03107df [M3][Menu] Update menu dev docs with M3 themes/styles
PiperOrigin-RevId: 395563838
2021-09-08 17:54:05 -04:00
conradchen
f0654ef3d1 [M3][Textfield] Internal change
PiperOrigin-RevId: 395557775
2021-09-08 17:43:13 -04:00
conradchen
cf395d5729 [M3][Snackbar] Internal change
PiperOrigin-RevId: 395480037
2021-09-08 17:40:46 -04:00