12 Commits

Author SHA1 Message Date
connieshi
d796149d25 Update chip to use themed color attributes.
PiperOrigin-RevId: 212104772
2018-09-14 10:51:49 -04:00
connieshi
bca3dad666 Add surface layer to ChipDrawable.
PiperOrigin-RevId: 210727850
2018-08-31 11:11:01 -04:00
connieshi
601f2511bc Add localization to Material Design Components lib, initially for chip.
PiperOrigin-RevId: 207265701
2018-08-17 16:58:09 -04:00
connieshi
516d00d8a6 Add attributes (chipTouchTargetDelegate, chipMinTouchTargetSize) to support chip meeting minimum accessible touch target size.
PiperOrigin-RevId: 206197663
2018-08-02 17:58:34 -07:00
connieshi
bc6a266edf Update chip to use textappearance theme attributes, and enforce textappearance check
PiperOrigin-RevId: 205120039
2018-07-19 11:03:13 -04:00
connieshi
6020fcdbf1 Fix API issue with icon visibility.
Deprecate *iconEnabled methods to is*iconVisible and setIs*iconVisible methods.

PiperOrigin-RevId: 202658616
2018-07-02 09:50:53 -04:00
connieshi
608d2b2fd7 Add support for android:maxWidth to ChipDrawable. Restrict the intrinsic width of the ChipDrawable by the max width. Fixes bug that ignored maxWidth set in Chip.
PiperOrigin-RevId: 202048514
2018-07-02 09:40:13 -04:00
connieshi
412ee4c1f1 Add support for tinting the chip icon.
PiperOrigin-RevId: 199526967
2018-06-20 17:24:18 -04:00
connieshi
57aeb2b7f8 Android Studio is looking for a "Chip" declare-stylable when trying to determine what attributes are applicable for the "Chip" component. Android Studio doesn't know that "ChipDrawable" is used internally and all attributes to "ChipDrawable" applies.
This is preventing completions of attribute names for Chip and the attribute panels shows up empty for Chip.

Rename R.styleable.ChipDrawable to R.styleable.Chip and update ChipDrawable to use it.

AS 3.2 canary > 14  (currently 16) is required to see the attributes in the attribute panel.

PiperOrigin-RevId: 198909123
2018-06-04 10:49:01 -04:00
connieshi
a71326896a Use the android:text attribute instead of chipText attribute to specify text label for ChipDrawable.
This is one in a series of planned changes that aim to delegate rendering a Chip's text to TextView instead of ChipDrawable.

PiperOrigin-RevId: 197780081
2018-05-30 17:19:38 -04:00
connieshi
56b6432e37 Add support to ellipsize chip text.
When converting float to int value for intrinsic width, round instead of cast.
Round float values When determining whether text needs to be clipped to avoid overly aggressive clipping (and ellipsizing).

Rewrote layout for the chip example in demo app due to a known GridLayout.

PiperOrigin-RevId: 195957006
2018-05-09 13:39:23 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00