1360 Commits

Author SHA1 Message Date
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
afohrman
594e5cd446 Add missing attributes to button res/public.xml.
Adds the following attributes:
-iconGravity
-checkedButton

This commit also:
- deletes iconTintMode, which is not declared in the button package and does not need to be included in the list of attributes in public.xml
- rearranges the ordering of the attributes for clarity

PiperOrigin-RevId: 294018694
2020-02-10 10:00:47 -05:00
Material Design Team
5a396edbb6 Always use padding in drawable state so that it can survive newDrawable()
Previously padding was set to both drawableState.padding and this.padding, but only retrieved from this.padding, which results in lost padding after newDrawable() and makes drawableState.padding useless.

PiperOrigin-RevId: 293878104
2020-02-10 09:59:00 -05:00
connieshi
def1b55632 Add explanation for why ?attr/chipSurfaceColor is not exposed publicly.
PiperOrigin-RevId: 293869990
2020-02-10 09:58:23 -05:00
cketcham
b467d65bc4 Add attributes from AppBar to public.xml
PiperOrigin-RevId: 293847895
2020-02-10 09:57:20 -05:00
cketcham
2cb8909027 Add attributes from BottomSheetBehavior to public.xml
PiperOrigin-RevId: 293841078
2020-02-10 09:56:42 -05:00
isabellekim
497cb97ef0 Expose common attributes that should be public.
PiperOrigin-RevId: 293840542
2020-02-10 09:56:09 -05:00
isabellekim
1f9de68025 [All] Add support for materialThemeOverlay
Resolves https://github.com/material-components/material-components-android/pull/948

GIT_ORIGIN_REV_ID=5a8bb35a56c1b813df47d964de8482a26e0da66d
PiperOrigin-RevId: 293839172
2020-02-10 09:55:19 -05:00
connieshi
4ffc1efebc Add comment explaining why certain attributes should remain private.
PiperOrigin-RevId: 293816051
2020-02-10 09:34:59 -05:00
isabellekim
1cdd0428ed Add public attributes to public.xml and add setter & getter for cardForegroundColor to Card.
PiperOrigin-RevId: 293675127
2020-02-07 10:34:25 -05:00
isabellekim
e7b729523b Add public attributes to public.xml for bottom navigation and FAB.
PiperOrigin-RevId: 293649570
2020-02-07 10:30:17 -05:00
haodong
5d3de5e34c Adding Color utility method.
PiperOrigin-RevId: 293629980
2020-02-07 10:29:21 -05:00
Guillermo Mazzola
7ef37a05dd [BottomSheetBehavior] Resolving behavior_expandedOffset as a dimen
Using an integer will remain allowed, however using a dimen will be preferred.

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

GIT_ORIGIN_REV_ID=4a02d95855569a076e5ee7a682ea5e8c9988eab9
PiperOrigin-RevId: 293623878
2020-02-06 17:25:57 -05:00
connieshi
cd7d38854a Add private attributes that should be public to public.xml.
PiperOrigin-RevId: 293608989
2020-02-06 17:25:29 -05:00
cketcham
5076e0ac30 Prevent Slider from intercepting the the back key
This prevents Slider from intercepting the back key when you'd expect the activity to handle it.

PiperOrigin-RevId: 293605504
2020-02-06 17:24:58 -05:00
marianomartin
50b020aec7 Resubmit Modify CollapsingTextHelper to use a StaticLayout instead of canvas.drawText.
PiperOrigin-RevId: 293443677
2020-02-05 17:30:20 -05:00
vipulasri
c859bf556c [TabLayout] added smooth scroll functionality in TabLayoutMediator
Resolves https://github.com/material-components/material-components-android/pull/951

GIT_ORIGIN_REV_ID=23c7ef34682c2eb55fcb18db677c54f006e3cb15
PiperOrigin-RevId: 293397927
2020-02-05 17:29:43 -05:00
connieshi
625a5d6da1 Add private attributes that should be public to public.xml.
PiperOrigin-RevId: 293279871
2020-02-05 17:29:07 -05:00
marianomartin
30ec731a28 Remove experimental annotation from ShapeableImageView
PiperOrigin-RevId: 293251962
2020-02-05 17:28:32 -05:00
cketcham
246b56faef Prevent the FAB from being moved up when anchored to BottomAppBar
PiperOrigin-RevId: 293211000
2020-02-04 17:33:39 -05:00
marianomartin
1673924a23 Automated g4 rollback of changelist 293151496
PiperOrigin-RevId: 293184366
2020-02-04 17:33:05 -05:00
marianomartin
7822b6d05e Modify CollapsingTextHelper to use a StaticLayout instead of canvas.drawText.
This will allow to support multiple lines.

PiperOrigin-RevId: 293151496
2020-02-04 17:32:07 -05:00
cketcham
4c99e53db4 Add support for D pad and keyboard control for Slider
This adds support for selecting an active thumb as well as changing the value of the currently selected thumb.

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

PiperOrigin-RevId: 293008598
2020-02-04 17:30:25 -05:00
isabellekim
687bb7ba2c Updating dialog theme attributes.
Resolves https://github.com/material-components/material-components-android/issues/799

PiperOrigin-RevId: 292978156
2020-02-03 15:54:04 -05:00
Material Design Team
f1053dfffb Add roleDescriptions to tabs for accessibility
PiperOrigin-RevId: 292620627
2020-02-03 10:22:49 -05:00
Material Design Team
1febcf94b1 Automated g4 rollback of changelist 292560239
PiperOrigin-RevId: 292606404
2020-01-31 16:53:08 -05:00
Material Design Team
811ea17e60 Add roleDescriptions to tabs for accessibility
PiperOrigin-RevId: 292560239
2020-01-31 13:38:39 -05:00
cketcham
e4e10e2238 Render the focused Slider value indicator on top
This also adds a surface color outline to the tooltip when there is more than one thumb so they can be distinguished when on top of each other.

PiperOrigin-RevId: 292558316
2020-01-31 13:38:05 -05:00
cketcham
99932525e9 Improve handling of touch input for Slider with multiple thumbs
This changes the logic of picking the correct thumb on touch down. The closest thumb will be picked unless there are two thumbs in the same spot. In that case it will wait for enough movement in the x direction to determine which thumb to pick.

PiperOrigin-RevId: 292353858
2020-01-31 11:13:06 -05:00
isabellekim
840a809715 Remove TODO bug reference.
PiperOrigin-RevId: 292337224
2020-01-31 11:12:21 -05:00
marianomartin
33733bd331 Remove {@link Month}`s from javadocs
PiperOrigin-RevId: 292335010
2020-01-31 11:11:22 -05:00
marianomartin
e56b141dd5 [MaterialButtonToggleGroup] SelectionRequired attribute doesn`t enforce checkedButtonId to be a valid id (returns -1)
Resolves https://github.com/material-components/material-components-android/issues/956

PiperOrigin-RevId: 292334820
2020-01-31 11:10:08 -05:00
cketcham
6e340c49d4 Fix BottomAppBarTopEdgeTreatment bug caused by large negative vertical offset
While some small negative values for vertical offset do work, this use case is currently not supported. Most negative values result in the cutout being drawn incorrectly. This also adds a new exception to help clarify the crash in the future.

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

PiperOrigin-RevId: 292148159
2020-01-29 16:15:04 -05:00
cketcham
a6e28bef76 Add support for multiple Slider thumbs
Resolves https://github.com/material-components/material-components-android/issues/916

PiperOrigin-RevId: 292135289
2020-01-29 16:14:10 -05:00
leticiars
a040af5bd3 [TextInputLayout] Fixing vertical gravity set on edit text being ignored for the expanded hint.
Resolves https://github.com/material-components/material-components-android/issues/933

PiperOrigin-RevId: 292015744
2020-01-29 16:12:04 -05:00
haodong
bb34f717df Refactor trackColor attribute into common resources.
PiperOrigin-RevId: 291983432
2020-01-29 15:32:01 -05:00
marianomartin
401b99e099 [Chip] Double emission on check state change when selectionRequired is used
Resolves https://github.com/material-components/material-components-android/issues/952

PiperOrigin-RevId: 291922419
2020-01-28 16:11:38 -05:00
leticiars
9d71db9717 Adding textInputLayoutFocusedRectEnabled attr to disable using the TextInputLayout's rect by default.
PiperOrigin-RevId: 291747634
2020-01-28 16:09:58 -05:00
marianomartin
20d2efed82 Change ShapeableImageView to use a Hardware layer
PiperOrigin-RevId: 291699732
2020-01-27 10:43:11 -05:00
marianomartin
39d49158c8 [ShapeableImageView] Re draw on invalidate if the drawable is animatable.
Resolves https://github.com/material-components/material-components-android/issues/890

PiperOrigin-RevId: 291142205
2020-01-23 08:28:19 -05:00
haodong
b1c4f539e1 Made LG devices exceptions for using date type of keyboard for date picker text input.
Resolves https://github.com/material-components/material-components-android/issues/901

- Check if the device is LG, and change the keyboard type if yes.
- Remove the exception for Samsung devices, they updated their date type keyboard with "." and "/".

PiperOrigin-RevId: 290753487
2020-01-21 09:13:23 -08:00
haodong
9f48006d62 [MaterialShapeDrawable] Fixed shadow paint not updating color while setting shadow color.
Resolves https://github.com/material-components/material-components-android/issues/909

PiperOrigin-RevId: 290750682
2020-01-21 09:11:11 -08:00
cketcham
0f18d9084c Prevent setting a height less than requested by using Math.round()
PiperOrigin-RevId: 290707432
2020-01-21 08:40:35 -08:00
connieshi
bd7de3d412 Add null check in #animateViewIn to guard against the post runnable executing after the view has been destroyed.
Resolves https://github.com/material-components/material-components-android/issues/917

PiperOrigin-RevId: 290300667
2020-01-17 13:57:49 -05:00
marianomartin
3cd591fd71 Change OnTabSelectedListener back to extend BaseOnTabSelectedListener
This brings back binary compatibility with 1.0.0 and 1.1.0-RC.

The reason this broke was because members were removed from the OnTabSelectedListener superclass set.
Which is not supported, regardless of whether tab OnTabSelectedListener still kept the same members.

https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.4

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

PiperOrigin-RevId: 290152502
2020-01-17 13:06:04 -05:00
Material Design Team
dc4efe78d9 Make draggable true by default - so it will be true when using Empty Constructor as well
PiperOrigin-RevId: 290121017
2020-01-17 13:02:36 -05:00
connieshi
a15d3ea219 Update TabLayout so it takes into account TabGravity in MODE_SCROLLABLE.
Add TabGravity.GRAVITY_START to maintain existing (default) MODE_SCROLLABLE behavior.
MODE_SCROLLABLE currently supports GRAVITY_CENTER and GRAVITY_START
MODE_FIXED does not support GRAVITY_START.

PiperOrigin-RevId: 289910847
2020-01-15 14:25:50 -08:00
marianomartin
17912e0599 Bring back removed TabLayout method for compatibility
Resolves https://github.com/material-components/material-components-android/issues/903

We accidentally removed this since it wasn't in 1.0.0 and it was deprecated. It exists to keep compatibility with version 27.0 of the library.

PiperOrigin-RevId: 289832106
2020-01-15 07:42:50 -08:00
Material Design Team
0a03911f89 Add more a11y support to AppBarLayout's BaseBehavior.
PiperOrigin-RevId: 289692654
2020-01-14 15:05:59 -08:00