1565 Commits

Author SHA1 Message Date
leticiars
fd848e8aac [ExposedDropdownMenu] Fixing double click sound when layout is clicked.
PiperOrigin-RevId: 299828619
2020-03-09 11:50:08 -07:00
Material Design Team
5213b46edd [Chip] Support setting checked icon's tint via xml attribute
PiperOrigin-RevId: 299429881
2020-03-09 10:45:57 -07:00
leticiars
2bf42a74bb [TextInputLayout] Calling clear() instead of setting text to null in ClearTextEndIconDelegate so that TalkBack announces that text was cleared.
PiperOrigin-RevId: 299417412
2020-03-09 09:39:10 -07:00
leticiars
d1850a3d78 [ExposedDropdownMenu] Implement workaround to inputType=none not working + move MaterialAutoCompleteTextView to textfield/ directory.
The alternative to android:editable="false" (which is deprecated) is to set inputType="none", however due to a framework bug that has no effect. This change makes it so it works as expected.

PiperOrigin-RevId: 299411110
2020-03-09 09:36:24 -07:00
melaniegoetz
2a188e507a Change Theme.MaterialComponents.BottomSheetDialog to use new bottomSheet style
Fixes: https://github.com/material-components/material-components-android/issues/1086
PiperOrigin-RevId: 299402955
2020-03-09 09:25:30 -07:00
marianomartin
7e99fcb67d Fix issue when setting padding and ShapeableImageView background
PiperOrigin-RevId: 299359752
2020-03-06 11:39:32 -08:00
isabellekim
6602bf622d Open access to MaterialColors.
Resolves https://github.com/material-components/material-components-android/issues/949

PiperOrigin-RevId: 299343895
2020-03-06 14:34:11 -05:00
melaniegoetz
d0f13768b5 Make @style/Widget.MaterialComponents.BottomSheet public
PiperOrigin-RevId: 299139774
2020-03-05 13:11:40 -08:00
hunterstich
0f0942bdfd Fix container transform flashing on API 22.
Resolves https://github.com/material-components/material-components-android/issues/1061

PiperOrigin-RevId: 298752245
2020-03-05 13:05:24 -08:00
Material Design Team
6ad240dfc0 Pass the item ID through to the item view which is created by the RecyclerView if the ID is greater than zero.
PiperOrigin-RevId: 298611118
2020-03-05 13:00:06 -08:00
cketcham
5a34bad28b Update content description for Slider
It shouldn't add the content description of the Slider if it doesn't exist.
It shouldn't add the min and max values if there's only 1 thumb.

PiperOrigin-RevId: 298453769
2020-03-05 12:58:24 -08:00
Paul Woitaschek
e2224fa0a4 Correctly initialize the slider state on instance state restoration.
Resolves https://github.com/material-components/material-components-android/pull/1072

GIT_ORIGIN_REV_ID=3a2adb451ab8b2879ea409793d0ebd6c60131f3d
PiperOrigin-RevId: 298379846
2020-03-02 15:37:08 -05:00
marianomartin
5706775bfd Expose customDatePicker so people don't have to limit to range or
single date.

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

PiperOrigin-RevId: 297875559
2020-02-28 15:12:40 -05:00
isabellekim
b5f4c788c6 Remove android:background from default MaterialButton styles in preparation for changing MaterialButton to read the android:background attribute.
PiperOrigin-RevId: 297875537
2020-02-28 15:10:26 -05:00
marianomartin
bbd645a341 [TabLayout] Mutate tabSelectedIndicator before tinting
Resolves https://github.com/material-components/material-components-android/issues/1029
Resolves https://github.com/material-components/material-components-android/issues/963

PiperOrigin-RevId: 297866034
2020-02-28 13:02:51 -05:00
cketcham
84a351281e Delay validation for Slider valueTo, valueFrom, stepSize, and values
This enables initially setting things that conflict. For instance if the current valueFrom is 0 and valueTo is 1, it's now possible to call setValueFrom() with something greater than 1 without immediately throwing an exception.

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

PiperOrigin-RevId: 297671715
2020-02-28 09:35:36 -05:00
connieshi
ded0c3ff61 Initialize chipCornerRadius to -1 instead of 0 so it would not ignore a user who sets the corner radius to 0.
Resolves https://github.com/material-components/material-components-android/issues/1058

PiperOrigin-RevId: 297422651
2020-02-27 15:49:57 -05:00
afohrman
bbb534e256 Deprecate transformation package in favor of MaterialContainerTransform.
The new recommendation is to use com.google.android.material.MaterialContainerTransform instead of the transformation library.

Also delete the catalog demo for transformation.

PiperOrigin-RevId: 297171082
2020-02-27 15:13:44 -05:00
isabellekim
5834d44a85 Update Chip close icon tint to have sufficient contrast.
PiperOrigin-RevId: 296985379
2020-02-24 18:34:21 -05:00
cketcham
0d709391bc Update primary color to match spec
PiperOrigin-RevId: 296949207
2020-02-24 18:30:14 -05:00
hunterstich
05804ddade Improve error message when container transform is unable to find an ancestor for the drawing view id.
PiperOrigin-RevId: 296884487
2020-02-24 18:28:14 -05:00
Material Design Team
4f21f83708 Automated g4 rollback of changelist 296479321
PiperOrigin-RevId: 296521978
2020-02-24 18:26:36 -05:00
Material Design Team
c5908974c6 Pass the item ID through to the item view which is created by the RecyclerView.
PiperOrigin-RevId: 296479321
2020-02-24 18:25:08 -05:00
marianomartin
8e8d20c94f Fix interpolation for MSD round rects
PiperOrigin-RevId: 296281750
2020-02-20 16:35:56 -05:00
marianomartin
e664b98062 [MaterialDatePicker] Crash - Scroll to Min Year of CalendarConstraint
Resolves https://github.com/material-components/material-components-android/pull/981
Resolves https://github.com/material-components/material-components-android/issues/980

PiperOrigin-RevId: 296000173
2020-02-19 13:36:30 -05:00
marianomartin
7e6dfce572 Bring back CollpasingToolbarLayout MaterialThemeOverlay support
PiperOrigin-RevId: 295971324
2020-02-19 13:27:47 -05:00
cketcham
b5c3fecacc Add warning to ShapePath when an operation is being used in a situation where a compatibility shadow would normally be drawn
PiperOrigin-RevId: 295847026
2020-02-19 10:52:22 -05:00
Felipe Roriz
4ccb052d2b [MaterialDatePicker] Added a DateValidator for a bounded range.
Resolves https://github.com/material-components/material-components-android/pull/972

GIT_ORIGIN_REV_ID=29cbbd569f5284f0bdf4cc1bdad60f93f92856eb

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 295810824
2020-02-18 18:03:44 -05:00
cketcham
9c3701a7cf Add ShapePath#cubicToPoint()
Resolves https://github.com/material-components/material-components-android/issues/924

PiperOrigin-RevId: 295775205
2020-02-18 16:53:15 -05:00
cketcham
1e1100f6a9 Clarify ShapePath#quadToPoint() will only draw native shadows
PiperOrigin-RevId: 295755346
2020-02-18 16:47:00 -05:00
isabellekim
983ee3d47b Use text buttons for framework AlertDialogs in V21+. The library does not encourage usage of the framework AlertDialog (use the AppCompat one instead), however this change is to help support areas that do use the framework AlertDialog, like preferences.
Note: the default theme (android:alertDialogTheme) for framework alert dialogs pre-21 is not a public resource and therefore we cannot inherit from that theme. For this reason, we are not changing the buttons for AlertDialogs pre-21 (they will continue to use the framework default). They will, however, look like the typical pre-21 framework AlertDialogs once MaterialButton supports android:background.
PiperOrigin-RevId: 295263002
2020-02-18 16:44:15 -05:00
cketcham
1bc4f60d81 Handle single tap for Slider in scrollable container
PiperOrigin-RevId: 295160709
2020-02-14 17:13:07 -05:00
haodong
5a99d6ac92 [Math] Add floorMod functions in MathUtils.
PiperOrigin-RevId: 295158443
2020-02-14 12:15:01 -05:00
marianomartin
934c407d7d Add a setter for maxInlineActionWidth
PiperOrigin-RevId: 295033109
2020-02-14 11:30:12 -05:00
onats1
89e0e5628e [Date Picker] Created a date validator class to handle resctrictions from previous dates until the current date.
Resolves https://github.com/material-components/material-components-android/pull/946

GIT_ORIGIN_REV_ID=442df27d6bd2d7c01de471328ba3a44eff82660d

Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 294982034
2020-02-13 13:57:28 -08:00
hunterstich
70f447d77e Fix gradle build and lint errors for transition package.
PiperOrigin-RevId: 294971841
2020-02-13 13:55:08 -08:00
hunterstich
a3a9793fb1 Fix container transform crash on API 21 and 22 due to path unioning.
PiperOrigin-RevId: 294924927
2020-02-13 13:49:21 -08:00
marianomartin
d7fbdba796 Automated g4 rollback of changelist 294487710
PiperOrigin-RevId: 294746271
2020-02-13 10:24:47 -05:00
cketcham
767915868d Fix Slider rounding error caused by floats
PiperOrigin-RevId: 294686381
2020-02-13 10:24:03 -05:00
cketcham
340cdea60d Add a11y support to Slider
This includes support for Range slider when there is more than one thumb. Each thumb can receive focus and behaves as if it was it's own SeekBar.

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

PiperOrigin-RevId: 294681995
2020-02-13 10:23:18 -05:00
marianomartin
56e4c61057 Remove obsolete TODO from Extended Floating Action Button style
PiperOrigin-RevId: 294680868
2020-02-13 10:22:40 -05:00
klblk
a67932de13 [MaterialDatePicker] Change to standalone month format
Resolves https://github.com/material-components/material-components-android/pull/1000

GIT_ORIGIN_REV_ID=24a02c2ce3daa40add8f1ec3bbd6860fcc4b6be1
PiperOrigin-RevId: 294516910
2020-02-12 10:13:32 -05:00
marianomartin
57beb64ddf Remove stub from Extended Floating Action Button
PiperOrigin-RevId: 294487710
2020-02-11 16:14:40 -05:00
johan12345
d7554adce3 Add catalog demo for CollapsingToolbarLayout with mutliple lines
Resolves https://github.com/material-components/material-components-android/pull/413
Resolves https://github.com/material-components/material-components-android/issues/6

PiperOrigin-RevId: 294481434
2020-02-11 14:36:03 -05:00
isabellekim
4abe78eec6 Add attributes for dialogs that should be public to public.xml
PiperOrigin-RevId: 294473825
2020-02-11 14:35:34 -05:00
marianomartin
739a2b03f6 Add popupMenuBackground to public.xml
PiperOrigin-RevId: 294470436
2020-02-11 14:35:08 -05:00
isabellekim
55200c3a8f Fix ExtendedFloatingActionButton to be WRAP_CONTENT when extended so that it will resizes on setText().
Resolves https://github.com/material-components/material-components-android/issues/449

PiperOrigin-RevId: 294261399
2020-02-10 17:29:35 -05:00
marianomartin
83e4e47d22 Initial support for Multiline CollapsingToolbarLayout
This cl adds the capabilities to set multiline on CollapsingToolbarLayout while keeping single line toolbars unchanged.

Co-Authored-By: johan12345 <johan.forstner@gmail.com>
PiperOrigin-RevId: 294256516
2020-02-10 14:32:15 -05:00
haodong
d6b2da8b50 [DatePicker] Added workaround for Samsung and LG devices to show URL keyboard when enter date in text.
PiperOrigin-RevId: 294219052
2020-02-10 14:31:45 -05:00
cketcham
9de1c97979 Add RTL support for Slider
PiperOrigin-RevId: 294114681
2020-02-10 10:01:30 -05:00