isabellekim
738cccb433
[Chip] Update javadocs @see methods to match the actual methods.
...
PiperOrigin-RevId: 344160354
2020-11-25 10:28:33 -05:00
connieshi
93f4f161cd
[Chip] If a close icon is purely decorative (e.g. no closeIconClickListener is specified), the close icon should not intercept the click and instead let the superclass manages the touch event for the overall chip.
...
PiperOrigin-RevId: 338260731
2020-10-21 15:51:08 -07:00
connieshi
8544f7acc2
[Chip] Include font padding.
...
Resolves https://github.com/material-components/material-components-android/issues/1424
PiperOrigin-RevId: 318817230
2020-06-29 16:17:12 -04:00
marianomartin
555356b03f
Internal cleanup
...
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
Material Design Team
76ffe35fef
Cleanup
...
PiperOrigin-RevId: 313865830
2020-06-01 16:52:06 -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
connieshi
0687ca80b0
Fix javadocs errors in Chip and ChipDrawable.
...
PiperOrigin-RevId: 300592847
2020-03-13 11:11:29 -04: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
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
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
Material Design Team
253cdc2114
Add CollectionInfos and CollectionItemInfos to ChipGroup and Chip for accessibility.
...
PiperOrigin-RevId: 288944549
2020-01-10 09:05:36 -08:00
Material Design Team
ba8e18ea62
Fix RTL padding issue on Chips.
...
PiperOrigin-RevId: 288737367
2020-01-08 12:11:28 -08:00
dniz
d72f3bc7d0
Remove log line from Chip
...
PiperOrigin-RevId: 286572627
2019-12-21 08:48:40 -05:00
connieshi
a3204758f9
Fix chip text mis-alignment when its width is less than the minimum recommended touch target width.
...
Resolves https://github.com/material-components/material-components-android/issues/800
PiperOrigin-RevId: 286421752
2019-12-19 15:46:43 -05:00
connieshi
2a9c3f3ad1
Automated g4 rollback of changelist 283714901
...
PiperOrigin-RevId: 283801062
2019-12-05 14:45:24 -05:00
connieshi
415628f1cd
Automated g4 rollback of changelist 283621202
...
PiperOrigin-RevId: 283714901
2019-12-05 14:37:46 -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
Material Design Team
bb72e50930
Automated g4 rollback of changelist 281530369
...
PiperOrigin-RevId: 281569140
2019-11-22 21:24:02 +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
connieshi
b58d3481c3
Restore padding after #setRippleColor update a chip's background.
...
PiperOrigin-RevId: 278660797
2019-11-06 10:18:27 -05:00
ldjesper
294f12498d
Rename setCornerRadius to setAllCornerSizes
...
PiperOrigin-RevId: 272959729
2019-10-04 20:08:43 -04:00
connieshi
c1c55475f3
Suppress ClickableViewAccessibility lint error in Chip#onTouchEvent.
...
PiperOrigin-RevId: 271128148
2019-09-26 17:55:16 -04:00
connieshi
461e7f9be8
Remove obsolete todo.
...
PiperOrigin-RevId: 268932308
2019-09-18 14:07:33 -04:00
connieshi
a6106e12b2
When a chip's close icon is purely decorative (i.e. no onCloseIconClickLisetener is set), avoid setting custom accessibility delegate.
...
PiperOrigin-RevId: 268904579
2019-09-18 14:03:37 -04:00
marianomartin
215a839598
Internal cleanup
...
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
cketcham
7bb525ff59
Update usages of ShapeAppearanceModel to use Builder pattern
...
PiperOrigin-RevId: 266144471
2019-08-29 15:39:51 -04:00
marianomartin
0d4515cb46
Internal cleanup
...
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
Material Design Team
79953b02e3
if we don't set anything, talkback will announce it as checkbox because this class extends AppCompatCheckBox. This fix set the class name to be generic android view so nothing is announced if view is not checkable or clickable
...
PiperOrigin-RevId: 265746456
2019-08-29 12:19:52 -04:00
cketcham
3021dc0ac8
Add @NonNull and @Nullable annotations
...
PiperOrigin-RevId: 264856214
2019-08-26 11:41:00 -04:00
connieshi
238fad4560
Update Chip's AccessibilityDelegate to avoid setting classname /type description when chip is not clickable or checkable.
...
PiperOrigin-RevId: 264676607
2019-08-26 11:12:38 -04:00
connieshi
a6f066c0bf
Chip is an unsupported item type according to Accessibility Scanner.
...
Set the class name on chip's AccessibilityNodeInfo as either android.widget.Button or android.widget.CompoundButton depending on whether chip is checkable.
PiperOrigin-RevId: 263424377
2019-08-16 16:12:47 -04:00
dniz
cc73c2a630
Update TODOs
...
PiperOrigin-RevId: 259535844
2019-07-23 11:21:39 -04:00
marianomartin
0a5d66ffc0
Internal cleanup
...
PiperOrigin-RevId: 257802841
2019-07-15 19:07:26 -04:00
marianomartin
164bf0fabd
Internal cleanup
...
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
dniz
5df3bebd63
Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
...
Will follow-up with TabLayout absolute elevation separately
Resolves https://github.com/material-components/material-components-android/issues/381
PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00
isabellekim
bee37933f4
Update chips to support state_checkable.
...
PiperOrigin-RevId: 255186618
2019-06-26 11:22:10 -04:00
isabellekim
b857c791f9
Change ripples on Chip to use the alphas provided in the ColorStateList.
...
RippleDrawable on different API levels will modulate the alphas differently
for the pressed / focused / hovered states. Therefore, in order to get the
desired alphas for pressed / focused / hovered states, we are using the
mtrl_low_ripple_(pressed|focused|hovered|default)_alpha values which have
been defined to account for the different implementations of RippleDrawable.
PiperOrigin-RevId: 254737730
2019-06-24 17:27:42 -04:00
marianomartin
367b295624
Internal cleanup
...
PiperOrigin-RevId: 254414602
2019-06-24 17:12:42 -04:00
connieshi
8c0f6f72c9
Call ChipDrawable#setShouldDrawText(false) inside Chip#setChipDrawable.
...
PiperOrigin-RevId: 253459599
2019-06-18 13:35:22 -04:00
Material Design Team
0aabd7848e
Automated g4 rollback of changelist 253229141
...
PiperOrigin-RevId: 253254250
2019-06-18 13:33:28 -04:00
Material Design Team
4c22b59c63
Cleanup for focus handing in Chips
...
PiperOrigin-RevId: 253229141
2019-06-18 13:27:43 -04:00
marianomartin
455ba2557b
Internal cleanup
...
PiperOrigin-RevId: 249490219
2019-05-24 14:22:06 -04:00
connieshi
462150b039
Update javadoc of Chip#ensureAccessibleTouchTarget(int) to describe the return value.
...
PiperOrigin-RevId: 248146423
2019-05-16 12:50:54 -04:00
Material Design Team
0a09c19dc6
Fix input focus handling inside Chips.
...
PiperOrigin-RevId: 246850628
2019-05-06 19:22:53 -04:00
connieshi
e6f429fe75
Fix bug that ignored Chip#setEnsureMinTouchTargetAttribute(false) once Chip#setEnsureMinTouchTargetAttribute(true) has been called.
...
Ensure chip width also meets the min touch target size.
PiperOrigin-RevId: 240679599
2019-04-05 15:17:59 -04:00
marianomartin
05bc55723a
Add a way to disable min touch target size in fab
...
PiperOrigin-RevId: 239395098
2019-03-22 17:00:43 -04:00
dniz
833258417d
Add @RequiresApi(VERSION_CODES.LOLLIPOP) to overriden setElevation() methods
...
that call super.setElevation()
PiperOrigin-RevId: 239171863
2019-03-22 16:50:21 -04:00
connieshi
6ebcd6416a
Elevation overlay support for chip.
...
PiperOrigin-RevId: 239029411
2019-03-22 16:30:10 -04:00
afohrman
ca07e5f616
Create OnChangedListener to respond to ShapeAppearanceModel changes and Shapeable interface, and implement it in Chip.
...
The OnChangedListener provides a callback that MaterialShapeDrawables can use to invalidate themselves when the associated ShapeAppearanceModel changes. This allows for modifying the ShapeAppearanceModel through the get/setShapeAppearance methods that the Shapeable interface exposes without having to update the client to redraw itself.
PiperOrigin-RevId: 238703600
2019-03-22 16:16:23 -04:00