Chip

public class Chip
extends AppCompatCheckBox implements ChipDrawable.Delegate

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.Button
         ↳ android.widget.CompoundButton
           ↳ android.widget.CheckBox
             ↳ android.support.v7.widget.AppCompatCheckBox
               ↳ com.google.android.material.chip.Chip


Chips are compact elements that represent an attribute, text, entity, or action. They allow users to enter information, select a choice, filter content, or trigger an action.

The Chip widget is a thin view wrapper around the ChipDrawable, which contains all of the layout and draw logic. The extra logic exists to support touch, mouse, keyboard, and accessibility navigation. The main chip and close icon are considered to be separate logical sub-views, and contain their own navigation behavior and state.

All attributes from Chip are supported. Do not use the android:background attribute. It will be ignored because Chip manages its own background Drawable. Also do not use the android:drawableStart and android:drawableEnd attributes. They will be ignored because Chip manages its own start (app:chipIcon) and end (app:closeIcon) drawables. The basic attributes you can set are:

You can register a listener on the main chip with setOnClickListener(OnClickListener) or setOnCheckedChangeListener(OnCheckedChangeListener). You can register a listener on the close icon with setOnCloseIconClickListener(OnClickListener).

See also:

Summary

XML attributes

Chip_chipIconTint  

Inherited constants

From class android.widget.TextView
From class android.view.View

Inherited fields

From class android.view.View

Public constructors

Chip(Context context)
Chip(Context context, AttributeSet attrs)
Chip(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

boolean dispatchKeyEvent(KeyEvent event)
Drawable getCheckedIcon()
ColorStateList getChipBackgroundColor()
float getChipCornerRadius()
Drawable getChipDrawable()

Returns the ChipDrawable backing this chip.

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()
CharSequence getChipText()

This method is deprecated. Use getText() instead.

Drawable getCloseIcon()
CharSequence getCloseIconContentDescription()
float getCloseIconEndPadding()
float getCloseIconSize()
float getCloseIconStartPadding()
ColorStateList getCloseIconTint()
TextUtils.TruncateAt getEllipsize()
void getFocusedRect(Rect r)
MotionSpec getHideMotionSpec()
float getIconEndPadding()
float getIconStartPadding()
ColorStateList getRippleColor()
MotionSpec getShowMotionSpec()
CharSequence getText()
float getTextEndPadding()
float getTextStartPadding()
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 isCloseIconVisible()
void onChipDrawableSizeChange()

Handles a change in the ChipDrawable's size.

boolean onHoverEvent(MotionEvent event)
boolean onKeyDown(int keyCode, KeyEvent event)
PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex)
boolean onTouchEvent(MotionEvent event)
boolean performCloseIconClick()

Call this chip's ERROR(/#onCloseIconClickListener), if it is defined.

void setBackground(Drawable background)
void setBackgroundColor(int color)
void setBackgroundDrawable(Drawable background)
void setBackgroundResource(int resid)
void setBackgroundTintList(ColorStateList tint)
void setBackgroundTintMode(PorterDuff.Mode tintMode)
void setCheckable(boolean checkable)
void setCheckableResource(int id)
void setChecked(boolean checked)
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 setChipDrawable(ChipDrawable drawable)

Sets the ChipDrawable backing this chip.

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 minHeight)
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 setChipText(CharSequence chipText)

This method is deprecated. Use setText(CharSequence) instead.

void setChipTextResource(int id)

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

void setCloseIcon(Drawable closeIcon)
void setCloseIconContentDescription(CharSequence closeIconContentDescription)
void setCloseIconEnabled(boolean closeIconEnabled)

This method is deprecated. Use setCloseIconVisible(boolean) 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)
void setCloseIconTint(ColorStateList closeIconTint)
void setCloseIconTintResource(int id)
void setCloseIconVisible(boolean closeIconVisible)
void setCloseIconVisible(int id)
void setCompoundDrawables(Drawable left, Drawable top, Drawable right, Drawable bottom)
void setCompoundDrawablesRelative(Drawable start, Drawable top, Drawable end, Drawable bottom)
void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable start, Drawable top, Drawable end, Drawable bottom)
void setCompoundDrawablesRelativeWithIntrinsicBounds(int start, int top, int end, int bottom)
void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom)
void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, Drawable bottom)
void setEllipsize(TextUtils.TruncateAt where)
void setGravity(int gravity)
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 setLines(int lines)
void setMaxLines(int maxLines)
void setMaxWidth(int maxWidth)
void setMinLines(int minLines)
void setOnCloseIconClickListener(View.OnClickListener listener)

Register a callback to be invoked when the close icon is clicked.

void setRippleColor(ColorStateList rippleColor)
void setRippleColorResource(int id)
void setShowMotionSpec(MotionSpec showMotionSpec)
void setShowMotionSpecResource(int id)
void setSingleLine(boolean singleLine)
void setText(CharSequence text, TextView.BufferType type)
void setTextAppearance(TextAppearance textAppearance)
void setTextAppearance(int resId)
void setTextAppearance(Context context, int resId)
void setTextAppearanceResource(int id)
void setTextEndPadding(float textEndPadding)
void setTextEndPaddingResource(int id)
void setTextStartPadding(float textStartPadding)
void setTextStartPaddingResource(int id)

Protected methods

boolean dispatchHoverEvent(MotionEvent event)
void drawableStateChanged()
int[] onCreateDrawableState(int extraSpace)
void onDraw(Canvas canvas)
void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)

Inherited methods

From class android.support.v7.widget.AppCompatCheckBox
From class android.widget.CheckBox
From class android.widget.CompoundButton
From class android.widget.Button
From class android.widget.TextView
From class android.view.View
From class java.lang.Object
From interface android.support.v4.widget.TintableCompoundButton
From interface android.widget.Checkable
From interface android.view.ViewTreeObserver.OnPreDrawListener
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource
From interface com.google.android.material.chip.ChipDrawable.Delegate

XML attributes

Chip_chipIconTint

Related methods:

Public constructors

Chip

Chip (Context context)

Parameters
context Context

Chip

Chip (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

Chip

Chip (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

Public methods

dispatchKeyEvent

boolean dispatchKeyEvent (KeyEvent event)

Parameters
event KeyEvent

Returns
boolean

getCheckedIcon

Drawable getCheckedIcon ()

Returns
Drawable

getChipBackgroundColor

ColorStateList getChipBackgroundColor ()

Returns
ColorStateList

getChipCornerRadius

float getChipCornerRadius ()

Returns
float

getChipDrawable

Drawable getChipDrawable ()

Returns the ChipDrawable backing this chip.

Returns
Drawable

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

getChipText

CharSequence getChipText ()

This method is deprecated.
Use getText() instead.

Returns
CharSequence

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

getCloseIconTint

ColorStateList getCloseIconTint ()

Returns
ColorStateList

getEllipsize

TextUtils.TruncateAt getEllipsize ()

Returns
TextUtils.TruncateAt

getFocusedRect

void getFocusedRect (Rect r)

Parameters
r Rect

getHideMotionSpec

MotionSpec getHideMotionSpec ()

Returns
MotionSpec

getIconEndPadding

float getIconEndPadding ()

Returns
float

getIconStartPadding

float getIconStartPadding ()

Returns
float

getRippleColor

ColorStateList getRippleColor ()

Returns
ColorStateList

getShowMotionSpec

MotionSpec getShowMotionSpec ()

Returns
MotionSpec

getText

CharSequence getText ()

Returns
CharSequence

getTextEndPadding

float getTextEndPadding ()

Returns
float

getTextStartPadding

float getTextStartPadding ()

Returns
float

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

isCloseIconVisible

boolean isCloseIconVisible ()

Returns
boolean

onChipDrawableSizeChange

void onChipDrawableSizeChange ()

Handles a change in the ChipDrawable's size.

onHoverEvent

boolean onHoverEvent (MotionEvent event)

Parameters
event MotionEvent

Returns
boolean

onKeyDown

boolean onKeyDown (int keyCode, 
                KeyEvent event)

Parameters
keyCode int

event KeyEvent

Returns
boolean

onResolvePointerIcon

PointerIcon onResolvePointerIcon (MotionEvent event, 
                int pointerIndex)

Parameters
event MotionEvent

pointerIndex int

Returns
PointerIcon

onTouchEvent

boolean onTouchEvent (MotionEvent event)

Parameters
event MotionEvent

Returns
boolean

performCloseIconClick

boolean performCloseIconClick ()

Call this chip's ERROR(/#onCloseIconClickListener), if it is defined. Performs all normal actions associated with clicking: reporting accessibility event, playing a sound, etc.

Returns
boolean True there was an assigned ERROR(/#onCloseIconClickListener) that was called, false otherwise is returned.

setBackground

void setBackground (Drawable background)

Parameters
background Drawable

setBackgroundColor

void setBackgroundColor (int color)

Parameters
color int

setBackgroundDrawable

void setBackgroundDrawable (Drawable background)

Parameters
background Drawable

setBackgroundResource

void setBackgroundResource (int resid)

Parameters
resid int

setBackgroundTintList

void setBackgroundTintList (ColorStateList tint)

Parameters
tint ColorStateList

setBackgroundTintMode

void setBackgroundTintMode (PorterDuff.Mode tintMode)

Parameters
tintMode PorterDuff.Mode

setCheckable

void setCheckable (boolean checkable)

Parameters
checkable boolean

setCheckableResource

void setCheckableResource (int id)

Parameters
id int

setChecked

void setChecked (boolean checked)

Parameters
checked boolean

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

setChipDrawable

void setChipDrawable (ChipDrawable drawable)

Sets the ChipDrawable backing this chip.

Parameters
drawable ChipDrawable

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 minHeight)

Parameters
minHeight 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

setChipText

void setChipText (CharSequence chipText)

This method is deprecated.
Use setText(CharSequence) instead.

Parameters
chipText CharSequence

setChipTextResource

void setChipTextResource (int id)

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

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(boolean) 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

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

setCompoundDrawables

void setCompoundDrawables (Drawable left, 
                Drawable top, 
                Drawable right, 
                Drawable bottom)

Parameters
left Drawable

top Drawable

right Drawable

bottom Drawable

setCompoundDrawablesRelative

void setCompoundDrawablesRelative (Drawable start, 
                Drawable top, 
                Drawable end, 
                Drawable bottom)

Parameters
start Drawable

top Drawable

end Drawable

bottom Drawable

setCompoundDrawablesRelativeWithIntrinsicBounds

void setCompoundDrawablesRelativeWithIntrinsicBounds (Drawable start, 
                Drawable top, 
                Drawable end, 
                Drawable bottom)

Parameters
start Drawable

top Drawable

end Drawable

bottom Drawable

setCompoundDrawablesRelativeWithIntrinsicBounds

void setCompoundDrawablesRelativeWithIntrinsicBounds (int start, 
                int top, 
                int end, 
                int bottom)

Parameters
start int

top int

end int

bottom int

setCompoundDrawablesWithIntrinsicBounds

void setCompoundDrawablesWithIntrinsicBounds (int left, 
                int top, 
                int right, 
                int bottom)

Parameters
left int

top int

right int

bottom int

setCompoundDrawablesWithIntrinsicBounds

void setCompoundDrawablesWithIntrinsicBounds (Drawable left, 
                Drawable top, 
                Drawable right, 
                Drawable bottom)

Parameters
left Drawable

top Drawable

right Drawable

bottom Drawable

setEllipsize

void setEllipsize (TextUtils.TruncateAt where)

Parameters
where TextUtils.TruncateAt

setGravity

void setGravity (int gravity)

Parameters
gravity int

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

setLines

void setLines (int lines)

Parameters
lines int

setMaxLines

void setMaxLines (int maxLines)

Parameters
maxLines int

setMaxWidth

void setMaxWidth (int maxWidth)

Parameters
maxWidth int

setMinLines

void setMinLines (int minLines)

Parameters
minLines int

setOnCloseIconClickListener

void setOnCloseIconClickListener (View.OnClickListener listener)

Register a callback to be invoked when the close icon is clicked.

Parameters
listener View.OnClickListener

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

setSingleLine

void setSingleLine (boolean singleLine)

Parameters
singleLine boolean

setText

void setText (CharSequence text, 
                TextView.BufferType type)

Parameters
text CharSequence

type TextView.BufferType

setTextAppearance

void setTextAppearance (TextAppearance textAppearance)

Parameters
textAppearance TextAppearance

setTextAppearance

void setTextAppearance (int resId)

Parameters
resId int

setTextAppearance

void setTextAppearance (Context context, 
                int resId)

Parameters
context Context

resId int

setTextAppearanceResource

void setTextAppearanceResource (int id)

Parameters
id int

setTextEndPadding

void setTextEndPadding (float textEndPadding)

Parameters
textEndPadding float

setTextEndPaddingResource

void setTextEndPaddingResource (int id)

Parameters
id int

setTextStartPadding

void setTextStartPadding (float textStartPadding)

Parameters
textStartPadding float

setTextStartPaddingResource

void setTextStartPaddingResource (int id)

Parameters
id int

Protected methods

dispatchHoverEvent

boolean dispatchHoverEvent (MotionEvent event)

Parameters
event MotionEvent

Returns
boolean

drawableStateChanged

void drawableStateChanged ()

onCreateDrawableState

int[] onCreateDrawableState (int extraSpace)

Parameters
extraSpace int

Returns
int[]

onDraw

void onDraw (Canvas canvas)

Parameters
canvas Canvas

onFocusChanged

void onFocusChanged (boolean focused, 
                int direction, 
                Rect previouslyFocusedRect)

Parameters
focused boolean

direction int

previouslyFocusedRect Rect