ChipDrawable

public class ChipDrawable
extends Drawable implements TintAwareDrawable, Drawable.Callback

java.lang.Object
   ↳ android.graphics.drawable.Drawable
     ↳ com.google.android.material.chip.ChipDrawable


ChipDrawable contains all the layout and draw logic for Chip.

You can use ChipDrawable directly in contexts that require a Drawable. For example, an auto-complete enabled EditText can replace snippets of text with a ChipDrawable to represent it as a semantic entity. To create an instance of ChipDrawable, use createFromResource(Context, int) and pass in an XML resource in this form:

<chip xmlns:app="http://schemas.android.com/apk/res-auto"
     android:text="Hello, World!"/>
 

The basic attributes you can set are:

  • android:checkable - If true, the chip can be toggled. If false, the chip acts like a button.
  • android:text - Sets the text of the chip.
  • app:chipIcon - Sets the icon of the chip, or use @null to display no icon. Usually on the left.
  • app:checkedIcon - Sets a custom icon to use when checked, or use @null to display no icon. Usually on the left.
  • app:closeIcon - Sets a custom icon that the user can click to close, or use @null to display no icon. Usually on the right.
  • ellipsize - Does not support MARQUEE because chip text should not scroll.

When used in this stand-alone mode, the host view must explicitly manage the ChipDrawable's state:

ChipDrawable's horizontal layout is as follows:

   chipStartPadding     iconEndPadding     closeIconStartPadding         chipEndPadding
    +                    +                                    +                      +
    |                    |                                    |                      |
    |  iconStartPadding  |  textStartPadding   textEndPadding | closeIconEndPadding  |
    |   +                |    +                            +  |                  +   |
    |   |                |    |                            |  |                  |   |
    v   v                v    v                            v  v                  v   v
 +-----+----+-----------+----+----+---------------------+----+----+----------+----+-----+
 |     |    |       XX  |    |    |  XX   X  X  X  XXX  |    |    | X      X |    |     |
 |     |    |      XX   |    |    | X  X  X  X  X  X  X |    |    |  XX  XX  |    |     |
 |     |    |  XX XX    |    |    | X     XXXX  X  XXX  |    |    |    XX    |    |     |
 |     |    |   XXX     |    |    | X  X  X  X  X  X    |    |    |  XX  XX  |    |     |
 |     |    |    X      |    |    |  XX   X  X  X  X    |    |    | X      X |    |     |
 +-----+----+-----------+----+----+---------------------+----+----+----------+----+-----+
                  ^                           ^                         ^
                  |                           |                         |
                  +                           +                         +
             chipIconSize                  *dynamic*              closeIconSize
 

ChipDrawable contains three child drawables: ERROR(/#chipIcon), ERROR(/#checkedIcon), and ERROR(/#closeIcon). chipIcon and checkedIcon inherit the state of this drawable, but closeIcon contains its own state that you can set with setCloseIconState(int[]).

See also:

Summary

Nested classes

interface ChipDrawable.Delegate

Delegate interface to be implemented by Views that own a ChipDrawable. 

XML attributes

Chip_chipIconTint  

Public methods

static ChipDrawable createFromAttributes(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Returns a ChipDrawable from the given attributes.

static ChipDrawable createFromResource(Context context, int id)

Returns a ChipDrawable from the given XML resource.

void draw(Canvas canvas)
int getAlpha()
Drawable getCheckedIcon()
ColorStateList getChipBackgroundColor()
float getChipCornerRadius()
float getChipEndPadding()
Drawable getChipIcon()
float getChipIconSize()
ColorStateList getChipIconTint()

Returns the ColorStateList used to tint the chip icon.

float getChipMinHeight()
float getChipStartPadding()
ColorStateList getChipStrokeColor()
float getChipStrokeWidth()
void getChipTouchBounds(RectF bounds)

Returns the chip's ChipDrawable-absolute bounds (top-left is [ChipDrawable.getBounds().left, ChipDrawable.getBounds().top]).

Drawable getCloseIcon()
CharSequence getCloseIconContentDescription()
float getCloseIconEndPadding()
float getCloseIconSize()
float getCloseIconStartPadding()
int[] getCloseIconState()

Describes the current state of the close icon.

ColorStateList getCloseIconTint()
void getCloseIconTouchBounds(RectF bounds)

Returns the close icon's ChipDrawable-absolute bounds (top-left is [ChipDrawable.getBounds().left, ChipDrawable.getBounds().top]).

ColorFilter getColorFilter()
TextUtils.TruncateAt getEllipsize()
MotionSpec getHideMotionSpec()
float getIconEndPadding()
float getIconStartPadding()
int getIntrinsicHeight()

Returns the height at which the chip would like to be laid out.

int getIntrinsicWidth()

Returns the width at which the chip would like to be laid out.

int getMaxWidth()

Returns the maximum width of TextView in terms of pixels.

int getOpacity()
void getOutline(Outline outline)
ColorStateList getRippleColor()
MotionSpec getShowMotionSpec()
CharSequence getText()
TextAppearance getTextAppearance()
float getTextEndPadding()
float getTextStartPadding()
boolean getUseCompatRipple()

Returns whether this ChipDrawable should draw its own compatibility ripples.

void invalidateDrawable(Drawable who)
boolean isCheckable()
boolean isCheckedIconEnabled()

This method is deprecated. Use isCheckedIconVisible() instead.

boolean isCheckedIconVisible()
boolean isChipIconEnabled()

This method is deprecated. Use isChipIconVisible() instead.

boolean isChipIconVisible()
boolean isCloseIconEnabled()

This method is deprecated. Use isCloseIconVisible() instead.

boolean isCloseIconStateful()

Indicates whether the close icon drawable will change its appearance based on state.

boolean isCloseIconVisible()
boolean isStateful()

Indicates whether this chip drawable will change its appearance based on state.

boolean onLayoutDirectionChanged(int layoutDirection)
void scheduleDrawable(Drawable who, Runnable what, long when)
void setAlpha(int alpha)

Sets the alpha of this ChipDrawable.

void setCheckable(boolean checkable)
void setCheckableResource(int id)
void setCheckedIcon(Drawable checkedIcon)
void setCheckedIconEnabled(boolean checkedIconEnabled)

This method is deprecated. Use setCheckedIconVisible(boolean) instead.

void setCheckedIconEnabledResource(int id)

This method is deprecated. Use setCheckedIconVisible(int) instead.

void setCheckedIconResource(int id)
void setCheckedIconVisible(int id)
void setCheckedIconVisible(boolean checkedIconVisible)
void setChipBackgroundColor(ColorStateList chipBackgroundColor)
void setChipBackgroundColorResource(int id)
void setChipCornerRadius(float chipCornerRadius)
void setChipCornerRadiusResource(int id)
void setChipEndPadding(float chipEndPadding)
void setChipEndPaddingResource(int id)
void setChipIcon(Drawable chipIcon)
void setChipIconEnabled(boolean chipIconEnabled)

This method is deprecated. Use setChipIconVisible(boolean) instead.

void setChipIconEnabledResource(int id)

This method is deprecated. Use setChipIconVisible(int) instead.

void setChipIconResource(int id)
void setChipIconSize(float chipIconSize)
void setChipIconSizeResource(int id)
void setChipIconTint(ColorStateList chipIconTint)

Sets the chip icon's color tint using the specified ColorStateList.

void setChipIconTintResource(int id)

Sets the chip icon's color tint using a resource ID.

void setChipIconVisible(int id)
void setChipIconVisible(boolean chipIconVisible)
void setChipMinHeight(float chipMinHeight)
void setChipMinHeightResource(int id)
void setChipStartPadding(float chipStartPadding)
void setChipStartPaddingResource(int id)
void setChipStrokeColor(ColorStateList chipStrokeColor)
void setChipStrokeColorResource(int id)
void setChipStrokeWidth(float chipStrokeWidth)
void setChipStrokeWidthResource(int id)
void setCloseIcon(Drawable closeIcon)
void setCloseIconContentDescription(CharSequence closeIconContentDescription)
void setCloseIconEnabled(boolean closeIconEnabled)

This method is deprecated. Use setCloseIconVisible(int) instead.

void setCloseIconEnabledResource(int id)

This method is deprecated. Use setCloseIconVisible(int) instead.

void setCloseIconEndPadding(float closeIconEndPadding)
void setCloseIconEndPaddingResource(int id)
void setCloseIconResource(int id)
void setCloseIconSize(float closeIconSize)
void setCloseIconSizeResource(int id)
void setCloseIconStartPadding(float closeIconStartPadding)
void setCloseIconStartPaddingResource(int id)
boolean setCloseIconState(int[] stateSet)

Specify a set of states for the close icon.

void setCloseIconTint(ColorStateList closeIconTint)
void setCloseIconTintResource(int id)
void setCloseIconVisible(boolean closeIconVisible)
void setCloseIconVisible(int id)
void setColorFilter(ColorFilter colorFilter)
void setDelegate(ChipDrawable.Delegate delegate)

Sets the View delegate that owns this ChipDrawable.

void setEllipsize(TextUtils.TruncateAt truncateAt)
void setHideMotionSpec(MotionSpec hideMotionSpec)
void setHideMotionSpecResource(int id)
void setIconEndPadding(float iconEndPadding)
void setIconEndPaddingResource(int id)
void setIconStartPadding(float iconStartPadding)
void setIconStartPaddingResource(int id)
void setMaxWidth(int maxWidth)

Sets the width of the TextView to be exactly pixels wide.

void setRippleColor(ColorStateList rippleColor)
void setRippleColorResource(int id)
void setShowMotionSpec(MotionSpec showMotionSpec)
void setShowMotionSpecResource(int id)
void setText(CharSequence text)
void setTextAppearance(TextAppearance textAppearance)
void setTextAppearanceResource(int id)
void setTextEndPadding(float textEndPadding)
void setTextEndPaddingResource(int id)
void setTextResource(int id)
void setTextStartPadding(float textStartPadding)
void setTextStartPaddingResource(int id)
void setTintList(ColorStateList tint)
void setTintMode(PorterDuff.Mode tintMode)
void setUseCompatRipple(boolean useCompatRipple)

Sets whether this ChipDrawable should draw its own compatibility ripples.

boolean setVisible(boolean visible, boolean restart)
void unscheduleDrawable(Drawable who, Runnable what)

Protected methods

boolean onLevelChange(int level)
void onSizeChange()

Attempts to call onChipDrawableSizeChange() on the delegate.

boolean onStateChange(int[] state)

Inherited methods

From class android.graphics.drawable.Drawable
From class java.lang.Object
From interface android.support.v4.graphics.drawable.TintAwareDrawable
From interface android.graphics.drawable.Drawable.Callback

XML attributes

Chip_chipIconTint

Related methods:

Public methods

createFromAttributes

ChipDrawable createFromAttributes (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)

Returns a ChipDrawable from the given attributes.

Parameters
context Context

attrs AttributeSet

defStyleAttr int

defStyleRes int

Returns
ChipDrawable

createFromResource

ChipDrawable createFromResource (Context context, 
                int id)

Returns a ChipDrawable from the given XML resource. All attributes from Chip and a custom style attribute are supported. A chip resource may look like:

<chip
     xmlns:app="http://schemas.android.com/apk/res-auto"
     style="@style/Widget.MaterialComponents.Chip.Entry"
     app:chipIcon="@drawable/custom_icon"/>
 

Parameters
context Context

id int

Returns
ChipDrawable

draw

void draw (Canvas canvas)

Parameters
canvas Canvas

getAlpha

int getAlpha ()

Returns
int

getCheckedIcon

Drawable getCheckedIcon ()

Returns
Drawable

getChipBackgroundColor

ColorStateList getChipBackgroundColor ()

Returns
ColorStateList

getChipCornerRadius

float getChipCornerRadius ()

Returns
float

getChipEndPadding

float getChipEndPadding ()

Returns
float

getChipIcon

Drawable getChipIcon ()

Returns
Drawable

getChipIconSize

float getChipIconSize ()

Returns
float

getChipIconTint

ColorStateList getChipIconTint ()

Returns the ColorStateList used to tint the chip icon.

Returns
ColorStateList

getChipMinHeight

float getChipMinHeight ()

Returns
float

getChipStartPadding

float getChipStartPadding ()

Returns
float

getChipStrokeColor

ColorStateList getChipStrokeColor ()

Returns
ColorStateList

getChipStrokeWidth

float getChipStrokeWidth ()

Returns
float

getChipTouchBounds

void getChipTouchBounds (RectF bounds)

Returns the chip's ChipDrawable-absolute bounds (top-left is [ChipDrawable.getBounds().left, ChipDrawable.getBounds().top]).

Parameters
bounds RectF

getCloseIcon

Drawable getCloseIcon ()

Returns
Drawable

getCloseIconContentDescription

CharSequence getCloseIconContentDescription ()

Returns
CharSequence

getCloseIconEndPadding

float getCloseIconEndPadding ()

Returns
float

getCloseIconSize

float getCloseIconSize ()

Returns
float

getCloseIconStartPadding

float getCloseIconStartPadding ()

Returns
float

getCloseIconState

int[] getCloseIconState ()

Describes the current state of the close icon.

Returns
int[]

getCloseIconTint

ColorStateList getCloseIconTint ()

Returns
ColorStateList

getCloseIconTouchBounds

void getCloseIconTouchBounds (RectF bounds)

Returns the close icon's ChipDrawable-absolute bounds (top-left is [ChipDrawable.getBounds().left, ChipDrawable.getBounds().top]).

Parameters
bounds RectF

getColorFilter

ColorFilter getColorFilter ()

Returns
ColorFilter

getEllipsize

TextUtils.TruncateAt getEllipsize ()

Returns
TextUtils.TruncateAt

getHideMotionSpec

MotionSpec getHideMotionSpec ()

Returns
MotionSpec

getIconEndPadding

float getIconEndPadding ()

Returns
float

getIconStartPadding

float getIconStartPadding ()

Returns
float

getIntrinsicHeight

int getIntrinsicHeight ()

Returns the height at which the chip would like to be laid out.

Returns
int

getIntrinsicWidth

int getIntrinsicWidth ()

Returns the width at which the chip would like to be laid out.

Returns
int

getMaxWidth

int getMaxWidth ()

Returns the maximum width of TextView in terms of pixels.

Returns
int

getOpacity

int getOpacity ()

Returns
int

getOutline

void getOutline (Outline outline)

Parameters
outline Outline

getRippleColor

ColorStateList getRippleColor ()

Returns
ColorStateList

getShowMotionSpec

MotionSpec getShowMotionSpec ()

Returns
MotionSpec

getText

CharSequence getText ()

Returns
CharSequence

getTextAppearance

TextAppearance getTextAppearance ()

Returns
TextAppearance

getTextEndPadding

float getTextEndPadding ()

Returns
float

getTextStartPadding

float getTextStartPadding ()

Returns
float

getUseCompatRipple

boolean getUseCompatRipple ()

Returns whether this ChipDrawable should draw its own compatibility ripples.

Returns
boolean

invalidateDrawable

void invalidateDrawable (Drawable who)

Parameters
who Drawable

isCheckable

boolean isCheckable ()

Returns
boolean

isCheckedIconEnabled

boolean isCheckedIconEnabled ()

This method is deprecated.
Use isCheckedIconVisible() instead.

Returns
boolean

isCheckedIconVisible

boolean isCheckedIconVisible ()

Returns
boolean

isChipIconEnabled

boolean isChipIconEnabled ()

This method is deprecated.
Use isChipIconVisible() instead.

Returns
boolean

isChipIconVisible

boolean isChipIconVisible ()

Returns
boolean

isCloseIconEnabled

boolean isCloseIconEnabled ()

This method is deprecated.
Use isCloseIconVisible() instead.

Returns
boolean

isCloseIconStateful

boolean isCloseIconStateful ()

Indicates whether the close icon drawable will change its appearance based on state.

The logic here and isStateful() must match ERROR(/#onStateChange(int[], int[])).

Returns
boolean

isCloseIconVisible

boolean isCloseIconVisible ()

Returns
boolean

isStateful

boolean isStateful ()

Indicates whether this chip drawable will change its appearance based on state.

The logic here and isCloseIconStateful() must match ERROR(/#onStateChange(int[], int[])).

Returns
boolean

onLayoutDirectionChanged

boolean onLayoutDirectionChanged (int layoutDirection)

Parameters
layoutDirection int

Returns
boolean

scheduleDrawable

void scheduleDrawable (Drawable who, 
                Runnable what, 
                long when)

Parameters
who Drawable

what Runnable

when long

setAlpha

void setAlpha (int alpha)

Sets the alpha of this ChipDrawable. This will drastically decrease draw performance. You are highly encouraged to use setAlpha(float) instead.

Parameters
alpha int

setCheckable

void setCheckable (boolean checkable)

Parameters
checkable boolean

setCheckableResource

void setCheckableResource (int id)

Parameters
id int

setCheckedIcon

void setCheckedIcon (Drawable checkedIcon)

Parameters
checkedIcon Drawable

setCheckedIconEnabled

void setCheckedIconEnabled (boolean checkedIconEnabled)

This method is deprecated.
Use setCheckedIconVisible(boolean) instead.

Parameters
checkedIconEnabled boolean

setCheckedIconEnabledResource

void setCheckedIconEnabledResource (int id)

This method is deprecated.
Use setCheckedIconVisible(int) instead.

Parameters
id int

setCheckedIconResource

void setCheckedIconResource (int id)

Parameters
id int

setCheckedIconVisible

void setCheckedIconVisible (int id)

Parameters
id int

setCheckedIconVisible

void setCheckedIconVisible (boolean checkedIconVisible)

Parameters
checkedIconVisible boolean

setChipBackgroundColor

void setChipBackgroundColor (ColorStateList chipBackgroundColor)

Parameters
chipBackgroundColor ColorStateList

setChipBackgroundColorResource

void setChipBackgroundColorResource (int id)

Parameters
id int

setChipCornerRadius

void setChipCornerRadius (float chipCornerRadius)

Parameters
chipCornerRadius float

setChipCornerRadiusResource

void setChipCornerRadiusResource (int id)

Parameters
id int

setChipEndPadding

void setChipEndPadding (float chipEndPadding)

Parameters
chipEndPadding float

setChipEndPaddingResource

void setChipEndPaddingResource (int id)

Parameters
id int

setChipIcon

void setChipIcon (Drawable chipIcon)

Parameters
chipIcon Drawable

setChipIconEnabled

void setChipIconEnabled (boolean chipIconEnabled)

This method is deprecated.
Use setChipIconVisible(boolean) instead.

Parameters
chipIconEnabled boolean

setChipIconEnabledResource

void setChipIconEnabledResource (int id)

This method is deprecated.
Use setChipIconVisible(int) instead.

Parameters
id int

setChipIconResource

void setChipIconResource (int id)

Parameters
id int

setChipIconSize

void setChipIconSize (float chipIconSize)

Parameters
chipIconSize float

setChipIconSizeResource

void setChipIconSizeResource (int id)

Parameters
id int

setChipIconTint

void setChipIconTint (ColorStateList chipIconTint)

Sets the chip icon's color tint using the specified ColorStateList.

Related XML Attributes:

Parameters
chipIconTint ColorStateList: ColorStateList to tint the chip icon.

setChipIconTintResource

void setChipIconTintResource (int id)

Sets the chip icon's color tint using a resource ID.

Related XML Attributes:

Parameters
id int: Resource id of a ColorStateList to tint the chip icon.

setChipIconVisible

void setChipIconVisible (int id)

Parameters
id int

setChipIconVisible

void setChipIconVisible (boolean chipIconVisible)

Parameters
chipIconVisible boolean

setChipMinHeight

void setChipMinHeight (float chipMinHeight)

Parameters
chipMinHeight float

setChipMinHeightResource

void setChipMinHeightResource (int id)

Parameters
id int

setChipStartPadding

void setChipStartPadding (float chipStartPadding)

Parameters
chipStartPadding float

setChipStartPaddingResource

void setChipStartPaddingResource (int id)

Parameters
id int

setChipStrokeColor

void setChipStrokeColor (ColorStateList chipStrokeColor)

Parameters
chipStrokeColor ColorStateList

setChipStrokeColorResource

void setChipStrokeColorResource (int id)

Parameters
id int

setChipStrokeWidth

void setChipStrokeWidth (float chipStrokeWidth)

Parameters
chipStrokeWidth float

setChipStrokeWidthResource

void setChipStrokeWidthResource (int id)

Parameters
id int

setCloseIcon

void setCloseIcon (Drawable closeIcon)

Parameters
closeIcon Drawable

setCloseIconContentDescription

void setCloseIconContentDescription (CharSequence closeIconContentDescription)

Parameters
closeIconContentDescription CharSequence

setCloseIconEnabled

void setCloseIconEnabled (boolean closeIconEnabled)

This method is deprecated.
Use setCloseIconVisible(int) instead.

Parameters
closeIconEnabled boolean

setCloseIconEnabledResource

void setCloseIconEnabledResource (int id)

This method is deprecated.
Use setCloseIconVisible(int) instead.

Parameters
id int

setCloseIconEndPadding

void setCloseIconEndPadding (float closeIconEndPadding)

Parameters
closeIconEndPadding float

setCloseIconEndPaddingResource

void setCloseIconEndPaddingResource (int id)

Parameters
id int

setCloseIconResource

void setCloseIconResource (int id)

Parameters
id int

setCloseIconSize

void setCloseIconSize (float closeIconSize)

Parameters
closeIconSize float

setCloseIconSizeResource

void setCloseIconSizeResource (int id)

Parameters
id int

setCloseIconStartPadding

void setCloseIconStartPadding (float closeIconStartPadding)

Parameters
closeIconStartPadding float

setCloseIconStartPaddingResource

void setCloseIconStartPaddingResource (int id)

Parameters
id int

setCloseIconState

boolean setCloseIconState (int[] stateSet)

Specify a set of states for the close icon. This is a separate state set than the one used for the rest of the chip.

Parameters
stateSet int

Returns
boolean

setCloseIconTint

void setCloseIconTint (ColorStateList closeIconTint)

Parameters
closeIconTint ColorStateList

setCloseIconTintResource

void setCloseIconTintResource (int id)

Parameters
id int

setCloseIconVisible

void setCloseIconVisible (boolean closeIconVisible)

Parameters
closeIconVisible boolean

setCloseIconVisible

void setCloseIconVisible (int id)

Parameters
id int

setColorFilter

void setColorFilter (ColorFilter colorFilter)

Parameters
colorFilter ColorFilter

setDelegate

void setDelegate (ChipDrawable.Delegate delegate)

Sets the View delegate that owns this ChipDrawable.

Parameters
delegate ChipDrawable.Delegate

setEllipsize

void setEllipsize (TextUtils.TruncateAt truncateAt)

Parameters
truncateAt TextUtils.TruncateAt

setHideMotionSpec

void setHideMotionSpec (MotionSpec hideMotionSpec)

Parameters
hideMotionSpec MotionSpec

setHideMotionSpecResource

void setHideMotionSpecResource (int id)

Parameters
id int

setIconEndPadding

void setIconEndPadding (float iconEndPadding)

Parameters
iconEndPadding float

setIconEndPaddingResource

void setIconEndPaddingResource (int id)

Parameters
id int

setIconStartPadding

void setIconStartPadding (float iconStartPadding)

Parameters
iconStartPadding float

setIconStartPaddingResource

void setIconStartPaddingResource (int id)

Parameters
id int

setMaxWidth

void setMaxWidth (int maxWidth)

Sets the width of the TextView to be exactly pixels wide.

Parameters
maxWidth int

setRippleColor

void setRippleColor (ColorStateList rippleColor)

Parameters
rippleColor ColorStateList

setRippleColorResource

void setRippleColorResource (int id)

Parameters
id int

setShowMotionSpec

void setShowMotionSpec (MotionSpec showMotionSpec)

Parameters
showMotionSpec MotionSpec

setShowMotionSpecResource

void setShowMotionSpecResource (int id)

Parameters
id int

setText

void setText (CharSequence text)

Parameters
text CharSequence

setTextAppearance

void setTextAppearance (TextAppearance textAppearance)

Parameters
textAppearance TextAppearance

setTextAppearanceResource

void setTextAppearanceResource (int id)

Parameters
id int

setTextEndPadding

void setTextEndPadding (float textEndPadding)

Parameters
textEndPadding float

setTextEndPaddingResource

void setTextEndPaddingResource (int id)

Parameters
id int

setTextResource

void setTextResource (int id)

Parameters
id int

setTextStartPadding

void setTextStartPadding (float textStartPadding)

Parameters
textStartPadding float

setTextStartPaddingResource

void setTextStartPaddingResource (int id)

Parameters
id int

setTintList

void setTintList (ColorStateList tint)

Parameters
tint ColorStateList

setTintMode

void setTintMode (PorterDuff.Mode tintMode)

Parameters
tintMode PorterDuff.Mode

setUseCompatRipple

void setUseCompatRipple (boolean useCompatRipple)

Sets whether this ChipDrawable should draw its own compatibility ripples.

Parameters
useCompatRipple boolean

setVisible

boolean setVisible (boolean visible, 
                boolean restart)

Parameters
visible boolean

restart boolean

Returns
boolean

unscheduleDrawable

void unscheduleDrawable (Drawable who, 
                Runnable what)

Parameters
who Drawable

what Runnable

Protected methods

onLevelChange

boolean onLevelChange (int level)

Parameters
level int

Returns
boolean

onSizeChange

void onSizeChange ()

Attempts to call onChipDrawableSizeChange() on the delegate.

onStateChange

boolean onStateChange (int[] state)

Parameters
state int

Returns
boolean