Because ChipDrawable is one drawable, the ripple is drawn over the text and icons.
It's possible to refactor this in the future so the ChipDrawable owns RippleDrawable, so that it can manage the drawing order.
Extract ripple subsystem to its own package.
Fix an issue with stateful ripple colors. Now all ripples are optimized for the pressed state, ignoring all other states.
Implement compat ripples for pre-21 Chips.
PiperOrigin-RevId: 173366665
Previously, we can bake a tint colorstatelist directly into the closeIcon drawable, but that has issues pre-23.
Previous demos also set a vector drawablestatelist as closeIcon, which has issues pre-21.
PiperOrigin-RevId: 173364754
Rename android:minHeight attribute to chipMinHeight.
These two attributes mean different things (and can now both be used at the same time).
PiperOrigin-RevId: 173363570
Add demo of using ChipDrawable in EditText.
Set the initial state of the chip and close icon to state_enabled. This is not done automatically if using ChipDrawable in a span.
PiperOrigin-RevId: 173362627
Left/right can move focus to the chip and close icon, after which focus jumps outside the chip.
Up/down/tab moves the focus outside the chip.
Whenever focus is newly gained, always focus the chip first. This is true even if focus is coming from the right.
We have to handle the keyboard focus explicitly, instead of relying on the ExploreByTouchHelper.
The reason is that one of our logical sub-views is the special identifier HOST_ID, which corresponds to the entire chip.
ExploreByTouchHelper seems to only work when all the sub-views are virtual views instead.
PiperOrigin-RevId: 173362171
Distinguishes clicks on the chip vs the close icon.
Support pressed and hover states on chip and the close icon separately.
PiperOrigin-RevId: 173361065
The main chip and close icon are virtual views denoted by HOST_ID and CLOSE_ICON_VIRTUAL_ID respectively.
They are each a node in the virtual view hierarchy, which a user can navigate through with TalkBack.
The spoken prompts for focusing the virtual views are:
Chip, checkable: "[Unchecked/checked] Chip. $chipText. Double tap to toggle."
Chip, uncheckable: "Chip. $chipText. Double tap to activate."
Close icon: "Close icon. Double tap to activate."
The spoke prompts for actions are:
Chip, checkable: "[Checked/not checked]"
Chip, uncheckable: ""
Close icon: ""
PiperOrigin-RevId: 173360466