1634 Commits

Author SHA1 Message Date
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
connieshi
7a8f3bd48c Rename color setters in Slider so it's obvious that color properties are ColorStateList.
PiperOrigin-RevId: 307436479
2020-04-20 15:04:20 -04:00
dniz
57a8ebdcdd Fix Activity container transform unexpected flash and fade
PiperOrigin-RevId: 307090565
2020-04-17 15:21:26 -04:00
SatoShun
9813cc5666 [MaterialSharedAxis] fix javadoc
Resolves https://github.com/material-components/material-components-android/pull/1210

GIT_ORIGIN_REV_ID=04314d6ef1150fc41e125ea6e49a3636413a7282
PiperOrigin-RevId: 307059021
2020-04-17 15:18:58 -04:00
marianomartin
b5533eae6b Swallow exception setting convex path in MaterialShapeDrawable for pre releases of Q
PiperOrigin-RevId: 306874530
2020-04-17 15:17:21 -04:00
connieshi
4fb2375688 Remove AppCompatButton workaround for FloatingToolbar in API 23-25 now that MaterialButton supports android:background.
PiperOrigin-RevId: 306841859
2020-04-17 15:10:15 -04:00
marianomartin
cc88816b82 [ProgressIndicator] initial commit
ORIGINAL_AUTHOR=pekingme
PiperOrigin-RevId: 306469609
2020-04-14 22:11:45 -04:00
Material Design Team
e802ecaa36 Add documentation to clarify percent units.
Otherwise it's pretty ambiguous, a percent logically is out of 100 but this unit is actually a fraction of the height intended to be in range 0-1.

PiperOrigin-RevId: 306281351
2020-04-14 21:37:46 -04:00
hunterstich
d6501c97bc [Slider] Fix attach/detach behavior when Slider is added in an overlay as part of a Transition.
Resolves https://github.com/material-components/material-components-android/issues/1195

A Visibility transition will add Slider to an overlay and then call onAttachToWindow/onDetachFromWindow which looks for an android.R.id.content view, which doen't exist, getting stuck in a loop. This adds an exit strategy for android.R.id.content not being found and fixes Slider in Visibility transitions.

PiperOrigin-RevId: 305886706
2020-04-13 10:21:36 -07:00
Audrius Karosevicius
df84e91819 Automated g4 rollback of changelist 304625391
PiperOrigin-RevId: 305727309
2020-04-13 09:47:05 -07:00
connieshi
d3e76d3a61 Alleviate badge being clipped off by calling setClipChildren(false) and setClipToPadding(false) on a tabview's parent.
If a long badge is shown on an end tab with a long string, it could still be clipped off. Current workaround is to adjust the badge offset.

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

PiperOrigin-RevId: 305686535
2020-04-13 09:27:58 -07:00
leticiars
2df71d156b [TextInputLayout] Fixing counter RTL not working for all languages.
PiperOrigin-RevId: 305286488
2020-04-09 05:19:45 -07:00
Material Design Team
7a300c134f Fix MaterialAlertDialog getting dismissed on any MotionEvent.
PiperOrigin-RevId: 305275984
2020-04-09 05:14:38 -07:00
hunterstich
a265520e42 [MaterialDatePicker] Update datepicker drawable resources to use material_ prefix.
Resolves https://github.com/material-components/material-components-android/issues/1166

PiperOrigin-RevId: 305078908
2020-04-06 13:26:41 -07:00
Material Design Team
e6e9a07f4b Automated g4 rollback of changelist 305014223
PiperOrigin-RevId: 305017071
2020-04-06 12:47:42 -07:00
hunterstich
2ac7fb75df [MaterialDatePicker] Prefix drawables with mtrl_ to avoid client confliects.
Resolves https://github.com/material-components/material-components-android/issues/1166

PiperOrigin-RevId: 305014223
2020-04-06 12:34:43 -07:00
Mygod
aa8042f498 [BottomSheet] Make touch_outside unfocusable
Resolves https://github.com/material-components/material-components-android/pull/974

GIT_ORIGIN_REV_ID=682a8b7ac7eb4bcdc238e04c14349b7beb4a8185
PiperOrigin-RevId: 304632071
2020-04-06 12:31:53 -07:00
Audrius Karosevicius
b7d46c4ba9 Automated g4 rollback of changelist 304610560
PiperOrigin-RevId: 304625391
2020-04-03 10:11:25 -07:00
Audrius Karosevicius
a6c0c4c53a [MaterialButton] Save state
Resolves https://github.com/material-components/material-components-android/pull/1123

GIT_ORIGIN_REV_ID=56600d14c8bab0932f3b3569c94d548d1c1523f2
PiperOrigin-RevId: 304610560
2020-04-03 10:06:26 -07:00
hunterstich
2a2792d4fb [Motion] Remove context parameter from MaterialContainerTransform.
PiperOrigin-RevId: 304389543
2020-04-03 09:57:54 -07:00
marianomartin
4ad50666b2 [MaterialCardView] Checked icon is being squeezed with useCompatPadding
Resolves https://github.com/material-components/material-components-android/issues/795

PiperOrigin-RevId: 304272773
2020-04-03 09:22:16 -07:00
Material Design Team
74921bbbce Update warning suppressions.
PiperOrigin-RevId: 304119651
2020-04-03 09:09:53 -07:00
leticiars
a3d356fdb4 [TextInputLayout] Fixing placeholder not respecting edit text's gravity.
Resolves: https://github.com/material-components/material-components-android/issues/1139
PiperOrigin-RevId: 304037224
2020-04-03 08:53:49 -07:00
melaniegoetz
4e28d9c916 Adjust BottomSheet peek height based on insets
PiperOrigin-RevId: 303819564
2020-04-03 08:44:46 -07:00
leticiars
236ce314e8 [ExposedDropdownMenu] Adding styles to public.xml
Resolves https://github.com/material-components/material-components-android/issues/1141

PiperOrigin-RevId: 303740794
2020-03-30 15:57:05 -04:00
isabellekim
309d71860f Respect android:background attribute for MaterialButton.
PiperOrigin-RevId: 303732939
2020-03-30 15:52:26 -04:00
hunterstich
148938ca84 [Motion] Update MaterialFadeThrough and MaterialFade to use MaterialVisibility and remove context param.
This updaes the remaining transitions to compose themselves of two animators instead of two visibility transitions. This also removes the context parameter from MaterialFadeThrough, MaterialFade and MaterialSharedAxis' constructors.

PiperOrigin-RevId: 303332658
2020-03-27 11:40:38 -04:00