1503 Commits

Author SHA1 Message Date
dniz
ae6fcf14e7 [Motion] Add more explanation to the MaterialContainerTransform method Javadocs
PiperOrigin-RevId: 312672592
2020-05-21 16:52:11 -04:00
leticiars
8a5c95c7b9 [TextInputLayout] Fixing crash when calling setBoxCornerRadii when edit text hasn't been added yet.
Resolves https://github.com/material-components/material-components-android/issues/1192

PiperOrigin-RevId: 312517954
2020-05-20 17:13:45 -04:00
dniz
0bdb2cbdbd [MaterialDatePicker] Make customDatePicker method public but restricted for now
PiperOrigin-RevId: 312495780
2020-05-20 17:11:37 -04:00
dniz
f20a91f980 [Motion] Update MaterialContainerTransform to use default scrim color constant instead of theme attribute
PiperOrigin-RevId: 312492669
2020-05-20 17:09:02 -04:00
connieshi
e521fda395 [Slider] Add range and invalid value to IllegalStateException message to make it more clear.
PiperOrigin-RevId: 312474145
2020-05-20 17:07:04 -04:00
Rafael Wolf de Goes
6455e69ba7 Automated g4 rollback of changelist 312323243
PiperOrigin-RevId: 312420120
2020-05-20 17:03:52 -04:00
dniz
d854e78d54 [MaterialDatePicker] Hide customDatePicker method since DateSelector API is not exposed yet. We will consider exposing this method and the DateSelector APIs in 1.3.
PiperOrigin-RevId: 312332065
2020-05-19 18:49:32 -04:00
Rafael Wolf de Goes
cbc46e9c8d [MaterialButton] Align icon on top
Resolves https://github.com/material-components/material-components-android/pull/1129

GIT_ORIGIN_REV_ID=8d663b1ca7f7bf62e1e5aa8cfc887a33bdbaf9a2
PiperOrigin-RevId: 312323243
2020-05-19 18:35:01 -04:00
dniz
ed41b2756f [Motion] Improve MaterialContainerTransform exception if start or end view bounds are null
PiperOrigin-RevId: 312273459
2020-05-19 18:31:04 -04:00
hunterstich
e00df6d075 [Motion] Add support for container transform start and end container colors.
PiperOrigin-RevId: 312152199
2020-05-19 10:23:24 -04:00
leticiars
e315754617 [TextInputLayout] Fixing end icon having unexpected behaviors when it's switched from another end icon mode.
Resolves https://github.com/material-components/material-components-android/issues/503

PiperOrigin-RevId: 312129467
2020-05-19 10:06:36 -04:00
marianomartin
8f0aa7f8d6 Split Slider into two classes
Slider throws an exception when calling getValue with more than one value. Supporting both single value and multiple values in the same class makes it confusing. While not supporting convenience methods getValue and setValue in the multi value class makes it, well, inconvenient.
In addition min, max are also a bit ambiguous since seekBar uses these for valueFrom and valueTo so those were removed.

PiperOrigin-RevId: 311774410
2020-05-18 11:19:05 -04:00
connieshi
7d92cd9a4a Set Slider to be clickable by default.
Resolves https://github.com/material-components/material-components-android/issues/1121

PiperOrigin-RevId: 311732626
2020-05-18 11:16:55 -04:00
dniz
a5381acf02 [Motion] Update MaterialContainerTransformSharedElementCallback to support custom shape appearances
PiperOrigin-RevId: 311150643
2020-05-12 19:31:12 -04:00
connieshi
d09ac03481 Prevent content from being clipped by MaterialCardView when a non-round rect is set as the shape.
Caution: content may extend outside shape.

PiperOrigin-RevId: 311135841
2020-05-12 19:29:22 -04:00
connieshi
2d0e00980c Dispatch button checked after the the button states have been updated and any internal corrections (e.g. singleSelection, selectionRequired) has been made.
Do not dispatch button checked if the button state does not actually change.

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

PiperOrigin-RevId: 310936891
2020-05-11 16:06:36 -04:00
hunterstich
b631ef6979 [Slider] Fix slider tooltip in popupwindows
Slider needs to find an ancestor in which it can add its tooltip overlay. When added in a PopupWindow, its possible to search up the view hierarchy and find a parent which is neither a View nor a ViewGroup. This change adds a check for this case

A note is that this change updates edge cases to return the current parent if it is any valid ancestor instead of just returning null. This allows Slider's tooltip to be added to Popup windows, but doesn't guarantee that the tooltip will be fully visible since a PopupWindow's height might be smaller than the slider + tooltip. If adding a Slider to a PopupWindow, you might need to manually add height to your popup's content view to account for the tooltip or turn of the slider's label.

PiperOrigin-RevId: 310913776
2020-05-11 16:04:03 -04:00
connieshi
47f3bbcec6 Update content description for badge number that exceeds the max supported badge count to say "More than # new notifications" instead of "# and more notifications".
PiperOrigin-RevId: 310908097
2020-05-11 15:57:03 -04:00
dniz
1094b48080 [Motion] Update MaterialContainerTransform to support drawing elevation shadows during transition
By default, the elevation shadows are only enabled for API level 28 and above, because Paint shadows are not supported with hardware acceleration below API level 28. If enabled for below API level 28, then the shadows will be drawn using MaterialShapeDrawable, however this may cause performance issues.

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

PiperOrigin-RevId: 310602814
2020-05-08 15:30:17 -04:00
raajkumars
d2f81cae5a Fixed issue that causes the Datepicker to highlight wrong the day as today.
Resolves https://github.com/material-components/material-components-android/issues/882

PiperOrigin-RevId: 310565860
2020-05-08 15:27:44 -04:00
Rafael Wolf de Goes
33700b0cd3 [TextInputLayout] Fix: merge icon and view state when setting icon color.
Resolves https://github.com/material-components/material-components-android/pull/1237
Resolves https://github.com/material-components/material-components-android/issues/1235
Resolves https://github.com/material-components/material-components-android/issues/879

GIT_ORIGIN_REV_ID=186c8f0786b57c406694501389ba31c91bc128e2
PiperOrigin-RevId: 310460890
2020-05-08 15:19:02 -04:00
raajkumars
2023df01b3 Renamed Month.today() to Month.current() to make it obvious that this method returns the first moment of the current month and not the first moment of the current day.
PiperOrigin-RevId: 310417056
2020-05-08 14:43:12 -04:00
marianomartin
59c156013f Make Slider a11y helper a static class
PiperOrigin-RevId: 310251893
2020-05-07 12:46:18 -04:00
leticiars
2bc442e3fb [Documentation] Updating FABs doc.
Deleting Extended FAB doc as it's now together with regular FAB.

PiperOrigin-RevId: 310161124
2020-05-07 12:18:26 -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
hunterstich
6ab9e11a0e [Motion] Fix container transform start delay flash
Switch the container transform to use a transition listener instead of an animator listener. A transition listener calls onTransitionStart as soon as the transition begins where an animator listener calls onAnimatorStart after the transitions delay, if any, casuing an unwanted visual flash of the end view before the animator starts.

PiperOrigin-RevId: 309977033
2020-05-07 11:26:11 -04:00
marianomartin
4db3fef49d Change progress indicator trackColor to correctly calculate default alpha
PiperOrigin-RevId: 309824054
2020-05-07 09:39:42 -04:00
dniz
b854a73772 [Motion] Add support for adding additional animator providers to MaterialVisibility transitions
PiperOrigin-RevId: 309767552
2020-05-04 14:52:19 -04:00
dniz
04c93ea5bb [Motion] Remove TransitionValues params from VisibilityAnimatorProvider interface methods
PiperOrigin-RevId: 309763088
2020-05-04 14:41:17 -04:00
Rafael
45f59032c8 [Chip]Fix chip icon with different width and height
Resolves https://github.com/material-components/material-components-android/pull/1242

GIT_ORIGIN_REV_ID=2c843f543245ac17327cbc55566eb3f8098d9082
Co-authored-by: wcshi <38438920+wcshi@github.com>
PiperOrigin-RevId: 309745804
2020-05-04 11:42:31 -04:00
dniz
ae7177d9de [Motion] Refactor MaterialVisibility to use constructor params for primary/secondary instead of abstract getDefault methods
Guarantees that the primary/secondary animator providers are initialized up front, which allows us to simplify the getters/setters to not have an initialization side-effect

PiperOrigin-RevId: 309435463
2020-05-01 15:08:35 -04:00
dniz
119954c881 Fix MaterialContainerTransform setScrimColor Javadoc error and getDrawingViewId/setDrawingViewId docs typo
PiperOrigin-RevId: 309404225
2020-05-01 15:06:33 -04:00
Anders Kielsholm
42126efce8 [MaterialButtonToggleGroup] Single visible button corners
Resolves https://github.com/material-components/material-components-android/pull/1260

GIT_ORIGIN_REV_ID=a5c22101761a8727bb1bdcfad8c16596883f3d93
PiperOrigin-RevId: 309259039
2020-05-01 14:45:25 -04:00
connieshi
eb65ce5b94 Update badge content description to match badge text displayed (when badge number exceeds max badge number).
Currently, when badge number exceeds max badge number, badge will display max badge number++ e.g. badge number == 1000, badge displays 999+ but content descriptions say "1000 new notifications".
This cl changes the content description to be "999 and more new notifications"

PiperOrigin-RevId: 309219315
2020-05-01 14:40:16 -04:00
hunterstich
d3ec2d82de [Motion] Update container transform invalid scrim color logic
PiperOrigin-RevId: 308802757
2020-04-28 06:58:00 -07:00
hunterstich
d025a3b2c3 [Motion] Replace MaterialVisibility subclass static constructors for standard constructors
PiperOrigin-RevId: 308793749
2020-04-28 06:52:44 -07:00
hunterstich
dc7d3a5d4d [Motion] Make public transition classes final which are not meant to be subclassed.
PiperOrigin-RevId: 308711224
2020-04-27 18:52:51 -04:00
hunterstich
407193625b [Motion] Add getters and setters to MaterialContainerTransform.ProgressThresholds
PiperOrigin-RevId: 308694078
2020-04-27 18:12:15 -04:00
hunterstich
e63cae59fb [Motion] Update MaterialVisibility to not need initialize method
- Add initialization check for secondary animator provider in MaterialVisibility so subclasses no longer need to explicitly call MaterialVisibility#initialize.

PiperOrigin-RevId: 308687877
2020-04-27 18:05:51 -04:00
dniz
cd36c2f5e7 [Motion] Update transitions to be based on androidx and add transitions platform subpackage to support Activities, Windows, etc.
PiperOrigin-RevId: 308651633
2020-04-27 17:32:30 -04:00
leticiars
e5a85a227a [TextInputLayout] Adding setBoxBackgroundColorStateList method and fixing setBoxBackgroundColor method not changing focused and hovered states color like it did originally.
Resolves https://github.com/material-components/material-components-android/issues/1191

PiperOrigin-RevId: 308275897
2020-04-24 21:51:34 -04:00
leticiars
167020a596 [TextInputLayout] Adding setters and getters for boxStrokeWidth and boxStrokeWidthFocused attrs.
PiperOrigin-RevId: 308059511
2020-04-23 20:10:31 -04:00
Frantisek Nagy
ed48ad9032 [MaterialRadioButton] Fix tint from theme attributes on api 21 + add test
Resolves https://github.com/material-components/material-components-android/issues/1225
Resolves https://github.com/material-components/material-components-android/pull/1226

GIT_ORIGIN_REV_ID=c6202adbe249d8a550113d397b538f3253c1ee06
PiperOrigin-RevId: 307897071
2020-04-22 17:48:27 -04:00
Nicklas Ansman Giertz
48a6f2892b [Motion] Use a private ID resource for the tag ID in MaterialContainerTransform
Resolves https://github.com/material-components/material-components-android/issues/1230
Resolves https://github.com/material-components/material-components-android/pull/1231

GIT_ORIGIN_REV_ID=df1fe9abcd9910302ef0ab97f34153e83a548467
PiperOrigin-RevId: 307895262
2020-04-22 17:45:40 -04:00
leticiars
99c6a28b10 [TextInputLayout] Flipping password icon behavior so that it shows the action (what's going to happen after the click) instead of the current status.
PiperOrigin-RevId: 307878068
2020-04-22 17:42:45 -04:00
connieshi
33683851f2 Remove "color" from getters/setters that end with "TintList" to be less verbose.
PiperOrigin-RevId: 307838995
2020-04-22 15:13:13 -04:00
marianomartin
de111bb53b Change ShapeableImageView shape logic to onSizeChanged
PiperOrigin-RevId: 307696728
2020-04-22 15:11:05 -04:00
dniz
b8c0496584 Fix nullability annotations in MaterialContainerTransformSharedElementCallback
PiperOrigin-RevId: 307661071
2020-04-22 15:08:21 -04:00
Kirill Olenyov
1b124afa02 [TextInputLayout] Add click listener for error icon
Resolves https://github.com/material-components/material-components-android/pull/1215

GIT_ORIGIN_REV_ID=f2ae41512162b09c4e37fa727b465970eb83f2b1
PiperOrigin-RevId: 307624385
2020-04-22 15:06:21 -04:00
nickrout
9df47a8548 [Documentation] Updating FAB javadoc to mention colorSecondary over colorAccent for background tint.
PiperOrigin-RevId: 307612259
2020-04-22 15:04:29 -04:00