1404 Commits

Author SHA1 Message Date
Material Design Team
d548948b9c [TabLayout] Re-introducing TabLayout indicator animator fix from cl/283626239
Includes a preemptive fix for b/145715060, which was introduced in the first attempt.

PiperOrigin-RevId: 284229049
2019-12-08 15:21:33 -05:00
marianomartin
15ed06eb86 Move ImageView component to third party
PiperOrigin-RevId: 284189970
2019-12-08 15:20:54 -05:00
Material Design Team
d8c35d7de9 Automated g4 rollback of changelist 283626239
PiperOrigin-RevId: 284045727
2019-12-08 14:43:33 -05:00
Zhaonian Luan
be8fb0f1ff [MaterialButtonToggleGroup] Clean up
Resolves https://github.com/material-components/material-components-android/pull/796

Co-authored-by: wcshi <38438920+wcshi@users.noreply.github.com>

GIT_ORIGIN_REV_ID=77f2471c1fbd9b44a8df1d252a41d582ddcbee0f
PiperOrigin-RevId: 284044596
2019-12-08 14:18:17 -05:00
haodong
77ce281f04 Fixed MaterialDatePicker todayInUtcMilliseconds method.
- Used UtcDates to return the UTC milliseconds of today in local timezone.
- Previous method is replaced with thisMonthInUtcMilliseconds, which fits its function better.
Resolves https://github.com/material-components/material-components-android/issues/778

PiperOrigin-RevId: 283981946
2019-12-05 15:58:26 -05:00
leticiars
b78be8d866 [TextInputLayout] Fixing error message getting announce twice in Q
PiperOrigin-RevId: 283972549
2019-12-05 15:15:32 -05:00
melaniegoetz
e0578295e1 Update BottomSheet to have a singular SettleRunnable
Resolves https://github.com/material-components/material-components-android/issues/516

PiperOrigin-RevId: 283802793
2019-12-05 14:50:09 -05:00
connieshi
2a9c3f3ad1 Automated g4 rollback of changelist 283714901
PiperOrigin-RevId: 283801062
2019-12-05 14:45:24 -05:00
sadeghpro
c4ce69756d [dialog] Fix multichoice and singlechoice alert dialog in rtl mode of old api
Resolves https://github.com/material-components/material-components-android/pull/753

Co-authored-by:hunterstich <hunterstich@google.com>

GIT_ORIGIN_REV_ID=f7475a875d5b9a30fa56928baa43cc2c513a1fe5
PiperOrigin-RevId: 283797976
2019-12-05 14:38:51 -05:00
connieshi
415628f1cd Automated g4 rollback of changelist 283621202
PiperOrigin-RevId: 283714901
2019-12-05 14:37:46 -05:00
Material Design Team
aa3164d43a [Tabs] Remove unnecessary animator cancellation in SlidingTabIndicator's onLayout method.
PiperOrigin-RevId: 283626239
2019-12-05 14:37:00 -05:00
connieshi
e3be6b0e85 Support setting textAllCaps in textAppearance xml, switch from calling setSingleLine to setLines(1) so the transformation methods don't replace each other.
android:textAllCaps="true" in the layout xml is being ignored because:

1) A known issue where Chip only reads from its textappearance. However, even after creating a custom textappearance that sets textAllCaps to true, I'm observing an odd behavior:
if I comment out the setSingleLine method call in the constructor, then the text becomes all caps. If I comment setSingleLine back in and call setAllCaps, then the text becomes capitalized and single line.

I think it's related to two different transformation methods being applied. The one inside setsingleline clobbers the one set by setAllCaps.

TextView's constructor applies the singleLine transformation before applying text appearance attributes
https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/widget/TextView.java#L1570-L1609

https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/widget/TextView.java#L10232

2) The library implementation of TextAppearance reads from "textAllCaps" instead of "android:textAllCaps".
11c57abbd6/lib/java/com/google/android/material/resources/TextAppearance.java (L96)
However, if you call Chip#setTextAppearance(@StyleRes int id) which passes it the super method, then "android:textAllCaps" needs to be set because "textAllCaps" is ignored
::sigh::

PiperOrigin-RevId: 283621202
2019-12-05 14:33:18 -05:00
cketcham
7d4b472262 Add copy of ViewOverlay compatibility until it is included in androidx
PiperOrigin-RevId: 283403884
2019-12-03 17:16:13 -05:00
leticiars
6efedee757 Adding onInitializeAccessibilityNodeInfo override in TextInputEditText.
In APIs < 23 some things set in TextInputLayout's AccessibilityDelegate get overwritten, so announcements are not as expected.

PiperOrigin-RevId: 283396918
2019-12-03 17:04:54 -05:00
connieshi
12c0e435dc Add reference to Github bug in todo for more context.
PiperOrigin-RevId: 283390765
2019-12-03 17:02:41 -05:00
connieshi
d25fa92021 Support tinted chip icons.
Resolves https://github.com/material-components/material-components-android/issues/767

PiperOrigin-RevId: 283387208
2019-12-03 17:00:18 -05:00
leticiars
11c57abbd6 [TextInputLayout] When error message is showing, announce it in place of the helper text when a text field is focused on.
PiperOrigin-RevId: 282801995
2019-12-02 17:33:35 -05:00
leticiars
6849bae3e9 [TextInputLayout] Fixing duplicate announcement when character limit is exceeded and adding announcement for when the limit is reached.
PiperOrigin-RevId: 282787253
2019-12-02 17:32:42 -05:00
marianomartin
58190deb21 [Slider] Cannot set stepSize < 1.0
Resolves https://github.com/material-components/material-components-android/issues/704

PiperOrigin-RevId: 282783034
2019-12-02 17:31:47 -05:00
Andreas Rossbacher
db7fde2cd6 [CardView] Fix potential Proguard/Dexguard/R8(?) optimization problem
Resolves https://github.com/material-components/material-components-android/pull/790

GIT_ORIGIN_REV_ID=fddc631d7a7c010044ab66247bec85f0aba097aa
PiperOrigin-RevId: 282769919
2019-12-02 17:31:16 -05:00
connieshi
3a337c0110 Hardcode non-framework classname used to call AccessibilityNodeInfo#setClassName so it doesn't get obfuscated by Proguard.
PiperOrigin-RevId: 282618314
2019-12-02 17:28:30 -05:00
cketcham
5d1a369ea0 Update Slider to use TooltipDrawable
PiperOrigin-RevId: 282583539
2019-12-02 17:27:40 -05:00
leticiars
29f3d05fa8 Adding helper text to the hint node so that TalkBack announces it when a text field is selected.
This provides more context for the user since the helper text is located below the text field (which is still focusable via TalkBack for now).

PiperOrigin-RevId: 282560641
2019-12-02 17:26:39 -05:00
cketcham
a282afe559 Initial implementation of TooltipDrawable
PiperOrigin-RevId: 282041829
2019-12-02 17:23:58 -05:00
marianomartin
c421319497 Remove tooltip from gradle
PiperOrigin-RevId: 282013901
2019-12-02 17:16:29 -05:00
cketcham
5f4a1394e5 Add OffsetEdgeTreatment
PiperOrigin-RevId: 281991688
2019-11-22 21:45:35 +00:00
marianomartin
781e79f4b1 Disable MaterialCardView bitmap drawing
PiperOrigin-RevId: 281825046
2019-11-22 21:27:37 +00:00
Material Design Team
cc9b9c1103 Add CollectionInfos and CollectionItemInfos to tabs for accessibility. Also make a tab non-clickable by a11y when it is selected.
PiperOrigin-RevId: 281785987
2019-11-22 21:25:50 +00:00
marianomartin
bb1e9e47a4 Enable non convex shadows on Q
PiperOrigin-RevId: 281750600
2019-11-22 21:24:52 +00:00
Material Design Team
bb72e50930 Automated g4 rollback of changelist 281530369
PiperOrigin-RevId: 281569140
2019-11-22 21:24:02 +00:00
hunterstich
7601cfda8e Add materialAlertDialogTheme to public resources.
Resolves https://github.com/material-components/material-components-android/issues/769

PiperOrigin-RevId: 281547191
2019-11-22 21:23:33 +00:00
Material Design Team
32362bed3d Automated g4 rollback of changelist 281519201
PiperOrigin-RevId: 281530369
2019-11-22 21:23:01 +00:00
connieshi
39e62ec220 Remove attrs check inside Chip#initMinTarget because the current context's theme may have custom values.
PiperOrigin-RevId: 281519201
2019-11-20 14:40:33 -05:00
cketcham
8ed1484690 Update MaterialShapeDrawable to handle overlapping edge and corners
PiperOrigin-RevId: 281498365
2019-11-20 14:39:06 -05:00
marianomartin
a4b90321e3 Add selection required option to MaterialButtonToggleGroup
Setting selectionRequired = true. Makes it so that the last option on the Group cannot be unselected. Similar to how a Text Alignment toggle works.

PiperOrigin-RevId: 281366158
2019-11-20 14:36:15 -05:00
marianomartin
573efa4b2f Add selection required option to ChipGroup
Resolves https://github.com/material-components/material-components-android/issues/651

PiperOrigin-RevId: 281274404
2019-11-19 10:31:43 -08:00
haodong
7823e88bb0 Forward fix lint error.
PiperOrigin-RevId: 281150048
2019-11-19 10:30:54 -08:00
cketcham
67491fca21 Add paddingBottomSystemWindowInsets to public attrs and update documentation
PiperOrigin-RevId: 281120848
2019-11-19 10:28:31 -08:00
connieshi
b200a3b6d2 Hardcode classname used to set accessibility item type to avoid being proguarded.
PiperOrigin-RevId: 281120646
2019-11-19 10:27:29 -08:00
connieshi
2eb666a7d8 Update chip's public.xml to include attributes for chipIconTint and closeIconTint
PiperOrigin-RevId: 281119011
2019-11-19 10:25:52 -08:00
dniz
1882fa96b5 Remove ThemeOverlay.AppCompat.Dark from Snackbar mtrl layouts
The theme overlay should no longer be needed now that we explicitly set colors on the Snackbar's message text and action button

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

PiperOrigin-RevId: 281067788
2019-11-19 10:21:00 -08:00
leticiars
d2870fbb3f Fixing a11y warning when AutoCompleteTextView inside a TextInputLayout doesn't have a hint.
The hint should be retrieved from the text input layout as it is what takes care of the hint behavior.

PiperOrigin-RevId: 280526998
2019-11-15 15:12:41 -05:00
leticiars
aeb9eea9d8 Allow a content description to be set on a text field error view. This is useful for when the error message has special characters that TalkBack cannot read.
PiperOrigin-RevId: 280508115
2019-11-15 15:12:03 -05:00
marianomartin
1cc1dd5778 Automated g4 rollback of changelist 278624814
PiperOrigin-RevId: 280494190
2019-11-15 15:11:32 -05:00
ldjesper
e56db0cee9 Update CHAR_LIMIT to 2 for MaterialCalendar strings that require a sub-character for i18n
PiperOrigin-RevId: 280474887
2019-11-15 15:10:57 -05:00
marianomartin
7eb1af5f8e Support disabling bitmap drawing in MaterialShapeDrawable
Creating an additional bitmap affects performance and there are instances where it's not necessary.

Add the option to disable that.

PiperOrigin-RevId: 280434620
2019-11-15 15:09:41 -05:00
marianomartin
c266251ee9 Cleanup HeaderBehavior
PiperOrigin-RevId: 280004172
2019-11-12 16:24:26 -05:00
leticiars
20f113212d [TextInputLayout] Adding support for the collapsed label position to be determined via the edit text gravity, such as center_horizontal.
Resolves https://github.com/material-components/material-components-android/pull/311
Resolves https://github.com/material-components/material-components-android/issues/609

PiperOrigin-RevId: 279998938
2019-11-12 16:23:41 -05:00
Mahdi Hosseinzadeh
d0ddeb05c3 [TextField] Fix documentation errors
Resolves https://github.com/material-components/material-components-android/pull/749

GIT_ORIGIN_REV_ID=b019c4846473655df0f3ca9a2b9ef8a4fbf66334
PiperOrigin-RevId: 279996234
2019-11-12 16:23:14 -05:00
ldjesper
62a2164f18 Include separator characters for Samsung devices in MaterialDatePicker
Resolves https://github.com/material-components/material-components-android/issues/682

PiperOrigin-RevId: 279146671
2019-11-07 16:12:20 -05:00