1686 Commits

Author SHA1 Message Date
Eugen Pechanec
3e3bc41abb [Slider] Keyboard navigation fix
Resolves https://github.com/material-components/material-components-android/pull/1364

GIT_ORIGIN_REV_ID=8a0fb870fafba516db529ffee13ea448964b0a9b
PiperOrigin-RevId: 315302829
2020-06-08 16:27:05 -04:00
leticiars
855602bb4f [TextInputLayout] Fixed icon tint not being applied properly when calling set*IconDrawable
Resolves https://github.com/material-components/material-components-android/issues/1142

PiperOrigin-RevId: 314965854
2020-06-05 14:58:39 -04:00
dniz
a65dbfc746 [Color] Added @color/material_on_surface_stroke to res-public
PiperOrigin-RevId: 314924864
2020-06-05 14:53:33 -04:00
connieshi
15c048c0fa [MaterialButtonToggleGroup] Do not update the checked state of any child buttons during onPressedChanged callback.
Resolves https://github.com/material-components/material-components-android/issues/1365

PiperOrigin-RevId: 314798502
2020-06-05 14:51:21 -04:00
Rafael Wolf de Goes
1171418c2b Automated g4 rollback of changelist 314715132
PiperOrigin-RevId: 314782767
2020-06-05 14:49:43 -04:00
Rafael Wolf de Goes
a284edd719 [MaterialButton] Align icon on top
Resolves https://github.com/material-components/material-components-android/pull/1129

GIT_ORIGIN_REV_ID=8d663b1ca7f7bf62e1e5aa8cfc887a33bdbaf9a2
PiperOrigin-RevId: 314715132
2020-06-05 14:46:34 -04:00
marianomartin
ef3f09d4e0 [ShapeableImageView] made stroke field nullable
PiperOrigin-RevId: 314599771
2020-06-04 16:05:33 -04:00
Yurii Blinov
c59acae371 [MaterialAutoCompleteTextView] NullPointerException on Meizu devices closes #1347
Resolves https://github.com/material-components/material-components-android/pull/1354
Resolves https://github.com/material-components/material-components-android/issues/1347

GIT_ORIGIN_REV_ID=506d9c8197cab69d63c1415237f2e75a0af1b155
PiperOrigin-RevId: 314222991
2020-06-02 12:48:41 -04:00
connieshi
470998c3dd Change string annotation from @StringRes to @PluralRes for parameter passed to. #setContentDescriptionQuantityStringsResource
PiperOrigin-RevId: 314122165
2020-06-01 17:03:28 -04:00
connieshi
3d01309475 Change annotation on customBadgeParent parameter in BadgeUtils's methods to be @Nullable and add null check before referencing it.
Resolves https://github.com/material-components/material-components-android/issues/1322

PiperOrigin-RevId: 314122111
2020-06-01 17:00:19 -04:00
Material Design Team
76ffe35fef Cleanup
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -04:00
marianomartin
63119cfa94 Fix potential NPE when progress indicators change visibility during initialization
PiperOrigin-RevId: 313826176
2020-06-01 16:45:21 -04:00
marianomartin
61d2be7c00 Remove default shape from style in image view
PiperOrigin-RevId: 313706577
2020-05-29 15:59:58 -04:00
Material Design Team
7cfc63ed35 Fix MaterialButton$SavedState ClassNotFoundException
PiperOrigin-RevId: 313512256
2020-05-29 15:51:33 -04:00
marianomartin
efc0a7f827 [ShapeableImageView] Improve default style
PiperOrigin-RevId: 313428562
2020-05-27 14:31:09 -04:00
marianomartin
30c7b24754 [ShapeableImageView] Add Shape appearance attributes for consistency and to fix autocomplete
PiperOrigin-RevId: 313414124
2020-05-27 14:04:46 -04:00
Ethan Hsu
2b676b46a9 [ShapeableImageView] Allow ShapeableImageView to dynamically update shape appearance
In some cases setShapeAppearanceModel will be called after onSizeChanged but before the first draw. This results in the mask being out of date.

Resolves https://github.com/material-components/material-components-android/pull/1328

GIT_ORIGIN_REV_ID=3d99c7857595ff0ba61c1aaa65963909c1950c10

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 313402813
2020-05-27 14:03:14 -04:00
dniz
7965098849 [MaterialDatePicker] Disable positive button when invalid or incomplete dates are selected
Resolves https://github.com/material-components/material-components-android/issues/1270
Resolves https://github.com/material-components/material-components-android/pull/1271

PiperOrigin-RevId: 313390751
2020-05-27 13:59:38 -04:00
marianomartin
24f9c06396 [ShapeableImageView] Change strokeWidth to float and support null for stroke color
Resolves https://github.com/material-components/material-components-android/issues/1330
Resolves https://github.com/material-components/material-components-android/issues/1331

PiperOrigin-RevId: 313390374
2020-05-27 13:57:38 -04:00
connieshi
68ccc33dad Set buttonBarButtonStyle in full Material Component themes to use @style/Widget.MaterialComponents.Button.TextButton.
Fixes regression in elevation demo introduced when MaterialButton added support for the android:background attribute.

PiperOrigin-RevId: 313390366
2020-05-27 13:54:35 -04:00
dniz
67e9eaf341 [MaterialDatePicker] Fix check for date input keyboard separator characters for single selection mode
Pointed out in d6b2da8b50 (r39471904)

PiperOrigin-RevId: 313382685
2020-05-27 13:50:17 -04:00
marianomartin
1303e400c1 Change Progress indicator to only show if they are already visible
PiperOrigin-RevId: 313327751
2020-05-27 13:48:38 -04:00
hunterstich
56b33909ee [Motion] Update ScaleProvider to use growing/shrinking naming. Fix MaterialSharedAxis isForward getter naming.
PiperOrigin-RevId: 313217150
2020-05-26 16:02:20 -04:00
connieshi
5889993bb3 Update BottomNavigation to respect left/right system insets
PiperOrigin-RevId: 313180090
2020-05-26 16:00:06 -04:00
dniz
1a6ebc0c56 [Motion] Remove boolean entering from MaterialFade constructor and don't set default duration
This makes MaterialFade more consistent with the other transition patterns

PiperOrigin-RevId: 312718402
2020-05-21 16:58:07 -04:00
raajkumars
b546cbd3ed Updated UtcDates class in datepicker implementation to allow injection of TimeSource instead of directly using Calendar.getInstance().
PiperOrigin-RevId: 312715093
2020-05-21 16:54:41 -04:00
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