2345 Commits

Author SHA1 Message Date
leticiars
d8e19ddedf [a11y][ExposedDropdownMenu] Fixed dropdown list not showing for non editable dropdown menus in switch access mode.
For the editable type it remains as was: clicking on the edit text triggers the keyboard and clicking on the arrow icon shows the dropdown list.

PiperOrigin-RevId: 408655618
2021-11-10 16:06:58 -05:00
leticiars
c7c5c7c625 [TextInputLayout] Fixed calculateLabelMarginTop() value for filled text field style, which caused getBaseline() to return a wrong offset.
PiperOrigin-RevId: 408655451
2021-11-10 16:06:08 -05:00
conradchen
c80177d062 [CollapsingTextHelper] Small clean-up of CollapsingTextHelper
PiperOrigin-RevId: 408644009
2021-11-10 16:04:13 -05:00
leticiars
dca7fc0701 [TextInputLayout][a11y] Fixed RTL support for setting corner radius on TextInputLayout.
PiperOrigin-RevId: 408621523
2021-11-10 16:03:01 -05:00
pfthomas
c6be59ce8b [Chip][a11y] Fix system level bold not applied
PiperOrigin-RevId: 408609073
2021-11-10 16:02:22 -05:00
conradchen
bc56d5b43b [M3][Card] Change checkedIconGravity values to enum
PiperOrigin-RevId: 408415041
2021-11-10 16:00:52 -05:00
leticiars
9b5356f2fe [DatePicker] Wrapped text fields from range picker selection in a ScrollView so their heights don't change in landscape mode.
PiperOrigin-RevId: 408333813
2021-11-10 15:57:22 -05:00
Gabriele Mariotti
250d56de4b [MaterialCardView] Added option to set the checkedIcon gravity
Resolves https://github.com/material-components/material-components-android/pull/1679

GIT_ORIGIN_REV_ID=a35c862071d83ced72c4d7257f2b7bc93101bfbb
PiperOrigin-RevId: 407662373
2021-11-10 15:35:03 -05:00
conradchen
e9ec82f5e9 [M3][Chip] Add input chip elevated styles to public
PiperOrigin-RevId: 407408090
2021-11-04 10:54:56 -04:00
conradchen
8ed0ac9fd3 [M3][Chip] Update M3 chip styles with spec
Adds elevation to selected & hovered state. Adds leading icon tint.

PiperOrigin-RevId: 407397700
2021-11-04 10:53:39 -04:00
Gabriele Mariotti
b2fbacecd4 [MaterialDatePicker] added methods to use custom text for positive and negative button
Resolves https://github.com/material-components/material-components-android/pull/1607

GIT_ORIGIN_REV_ID=75093200ddeae117ae57a3e89e28d109f520ec8d
PiperOrigin-RevId: 407376627
2021-11-04 10:53:04 -04:00
Material Design Team
aaac96d724 [TextField] Fix helper text label for usage
The setLabelFor calls were made in the call to populate the accessibility node but they were made after calling super (one of them was actually nested inside of a getter!), this is too late, the accessibility node is populated with the label for by the super class

PiperOrigin-RevId: 407178334
2021-11-04 10:52:21 -04:00
conradchen
a455a53a6d [M3][Color] Move dynamic color public resources to all versions
PiperOrigin-RevId: 407141799
2021-11-04 10:51:45 -04:00
conradchen
e5023f63ae [M3][Colors] Add supporting manufacturer list of dynamic colors
PiperOrigin-RevId: 406892239
2021-11-04 10:49:57 -04:00
Khang NT
b935604e2c [AppBarLayout] Fix snap issue with transparent status bar
Resolves https://github.com/material-components/material-components-android/pull/2387

GIT_ORIGIN_REV_ID=47538c3b4cb10337c537d1ef532bd1d73b216ae3
PiperOrigin-RevId: 406835368
2021-11-01 19:53:05 +00:00
pfthomas
bed2ac17a7 [M3] Add textAppearanceListItem* styles to theme
PiperOrigin-RevId: 406832937
2021-11-01 19:31:19 +00:00
leticiars
9d2f864f0a [TextInputLayout] Fixed getBoxCornerRadiusBottomEnd and getBoxCornerRadiusBottomStart returning wrong values.
PiperOrigin-RevId: 406360531
2021-10-29 18:48:29 +00:00
leticiars
c352dfde8d [TextInputLayout] Fixed shouldAnimateCaptionView() returning true when captionText is null.
captionView.getText() doesn't ever return null (only "" if it's empty), so changed captionText parameter to be @NonNull

PiperOrigin-RevId: 406358148
2021-10-29 18:47:26 +00:00
leticiars
3ca3b71bb2 [TextInputLayout] Don't add placeholder view to text field's input frame if placeholder is null.
PiperOrigin-RevId: 406129696
2021-10-28 18:50:16 +00:00
leticiars
20c3ad0413 [a11y][TextInputLayout] Removed TextInputLayout's placeholder text duplicated announcement.
Before, when swiping with TalkBack on, the placeholder text would be mistakenly announced. This change makes it so it's only announced when it appears, for API >= 16. It's still announced as part of the description announcement when the text field is selected, as before, so it's still accessible for APIs < 16.

PiperOrigin-RevId: 405668594
2021-10-27 18:54:35 +00:00
pfthomas
dbd37d2791 [BottomSheetBehavior] Remove IllegalArgumentException in settleToState
PiperOrigin-RevId: 405497835
2021-10-27 18:53:26 +00:00
conradchen
dc0c5f3d85 [M3][Color] Add public dynamic color resources
PiperOrigin-RevId: 405411796
2021-10-25 16:10:26 +00:00
Material Design Team
8bf3bdeb8a Automated g4 rollback of changelist 404871534
PiperOrigin-RevId: 404899483
2021-10-25 16:08:53 +00:00
leticiars
2701161bbd [a11y][TextInputLayout] Removed TextInputLayout's placeholder text duplicated announcement, and fixed edge case where placeholder text was being enabled and added to the input frame while it was set to null.
Before, when swiping with TalkBack on, the placeholder text would be mistakenly announced. This change makes it so it's only announced when it appears, for API >= 16. It's still announced as part of the description announcement when the text field is selected, as before, so it's still accessible for APIs < 16.

PiperOrigin-RevId: 404871534
2021-10-25 16:07:47 +00:00
conradchen
abb9d5bf99 [M3][Chip] Update chip styles with spec
PiperOrigin-RevId: 404852054
2021-10-25 16:06:43 +00:00
Material Design Team
df873168e0 [M3][Color] Harmonize iteration
PiperOrigin-RevId: 404797844
2021-10-21 18:56:00 +00:00
dsn5ft
3a57f5d58b [TimePicker] Attempt to fix onDoubleTap() NullPointerException
PiperOrigin-RevId: 404651939
2021-10-21 18:54:41 +00:00
conradchen
8729d8ab57 [SnackBar] Fix maxWidth and maxInlineActionWidth are not applied
We load maxWidth and maxInlineActionWidth style attributes in SnackbarContentLayout, but the snackbar styles are only applied to SnackbarLayout. We need to pass the values to SnackbarContentLayout, as we did for actionTextColorAlpha.

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

PiperOrigin-RevId: 404320339
2021-10-20 19:18:47 +00:00
Material Design Team
01c1fc723d Automated g4 rollback of changelist 404266249
PiperOrigin-RevId: 404294350
2021-10-20 19:11:30 +00:00
conradchen
d10c75b357 [TextField] Fix collapsed hint cutout is not correctly applied
The box background of text fields are applied to EditTexts instead of the TextInputLayout. So when there are paddings in TextInputLayout, we will need to adjust cutout bounds, which is calculated based on TextInputLayout's coordinates, according to the paddings.

PiperOrigin-RevId: 404281248
2021-10-20 19:09:50 +00:00
leticiars
aa58657042 [a11y][TextInputLayout] Removed TextInputLayout's placeholder text duplicated announcement.
Before, when swiping with TalkBack on, the placeholder text would be mistakenly announced. This change makes it so it's only announced when it appears, for API >= 16. It's still announced as part of the description announcement when the text field is selected, as before, so it's still accessible for APIs < 16.

PiperOrigin-RevId: 404266249
2021-10-20 19:07:29 +00:00
dsn5ft
9ae56ceedd [Javadocs] Remove all broken attr links from Javadocs
PiperOrigin-RevId: 404246710
2021-10-20 19:06:18 +00:00
pekingme
9de9319b1e [Resources] Added styles in res-public.
PiperOrigin-RevId: 403451624
2021-10-18 15:31:13 -04:00
dsn5ft
93cdd95d6a [TimePicker] Make MaterialTimePicker implement OnDoubleTapListener interface instead of instantiating anonymous inner class
PiperOrigin-RevId: 403415529
2021-10-18 12:37:06 -04:00
conradchen
841fe974f0 [M3][TimePicker] Unify the theme/style names of time pickers
Renames all Material3.TimePicker.* to Material3.MaterialTimePicker.*.

PiperOrigin-RevId: 402844038
2021-10-13 16:39:56 -04:00
serniebanders
a290c38cfd [AppBar] Defines collapsing text alpha value to be at most as transparent as the user defines.
This enables the user to set the expanded text as fully transparent, as well as any other text alpha value.

Fixes: https://github.com/material-components/material-components-android/issues/2293
PiperOrigin-RevId: 402829737
2021-10-13 16:36:27 -04:00
pfthomas
e906367de5 [MaterialTimePicker] Fix showing keyboard requires 2 taps in text input mode
PiperOrigin-RevId: 402567146
2021-10-12 11:43:03 -04:00
pfthomas
228ad853f4 [TimePicker][Accessibility] Announce time has changed after clock selection
PiperOrigin-RevId: 402557800
2021-10-12 11:41:55 -04:00
Nitish Bhatt
1f7202a953 [FloatingActionButton]add setter for max image size
Resolves https://github.com/material-components/material-components-android/pull/2415

GIT_ORIGIN_REV_ID=3f0603a3f169c12d02c127726dff091c94f3561a
PiperOrigin-RevId: 402552778
2021-10-12 11:40:58 -04:00
nikhiljainlive
0181029efb [MaterialTimePicker] Fix Input mode is not changed when keyboard icon is clicked when the app is returned from background
Resolves https://github.com/material-components/material-components-android/pull/2419

GIT_ORIGIN_REV_ID=80ba4c214cbd565ad461bef80fb9ae01b8671a0e
PiperOrigin-RevId: 402550766
2021-10-12 11:40:24 -04:00
pekingme
c1f7dfc314 [Tokens] Updated resources to v0.54.
PiperOrigin-RevId: 402383462
2021-10-12 11:39:48 -04:00
conradchen
79ae9b1351 [TextInputLayout] Create label cutout only on borders
When a collapsed label is showing, we cutout part of the border of an outlined text input box according to the exact stroke width. However when using rounded corners, there can be slight offsets from where the border is really drawn. Also, if the corner size is large, the part of border we need to cutout might not just be a straight line but contains part of the corner.

However, with the existing cutout logic, we cannot just cutout the whole label area, which will cause the area inside the border also gets cutout, if it has color. This CL changes the cutout drawing logic to only apply the cutout on stroke drawing to fix the issue.

This CL also fixes the bug that when the label is too long, we didn't take the ellipsized text length into account. Creates a variable to store the calculated collapsed text width to fix the issue.

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

PiperOrigin-RevId: 402316057
2021-10-12 11:26:21 -04:00
Material Design Team
c1f48a74c2 [NavigationBar] getPresenter update
PiperOrigin-RevId: 401843016
2021-10-11 10:59:53 -04:00
Riccardo Ciovati
1b8fb30370 [CollapsingToolbarLayout] Allow customizing the title position interpolator
Resolves https://github.com/material-components/material-components-android/pull/1757

GIT_ORIGIN_REV_ID=87dea3a74d8a8f460cc9beb32bcb783f71ee6e63
PiperOrigin-RevId: 401826042
2021-10-11 10:59:08 -04:00
conradchen
f6426f691c [M3][Theme] Remove redundant day-night theme overly aliasing
PiperOrigin-RevId: 401799637
2021-10-11 10:54:07 -04:00
Material Design Team
90c78b97a5 [M3][Color] Add M3 Dynamic Color Themes for AppWidgets
PiperOrigin-RevId: 401780997
2021-10-11 10:52:20 -04:00
pekingme
e9bca65652 Automated g4 rollback of changelist 398768587
PiperOrigin-RevId: 401342017
2021-10-06 20:14:36 -04:00
conradchen
a1e33f19d4 [M3][Dialog] Simplify M3 dialog theme structure
Removes unneeded inheritance structure to improve maintainability and readability.

PiperOrigin-RevId: 401327728
2021-10-06 20:12:43 -04:00
conradchen
cde684ab42 [DatePicker][TimePicker] Replace confirm button strings
On certain Android devices it seems the framework string @android:string/ok is not available. Replaces the usage of the strings with Material specific strings.

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

PiperOrigin-RevId: 400814492
2021-10-05 09:05:36 -04:00
serniebanders
5844d3c134 [Button] Update icon state on Drawable state change.
Resolves: https://github.com/material-components/material-components-android/issues/2322

Follows pattern in View.drawableStateChanged() where drawable properties have states manually set.

PiperOrigin-RevId: 400754477
2021-10-05 09:04:56 -04:00