Chip

public class Chip
extends AppCompatCheckBox implements ChipDrawable.Delegate, Shapeable, Checkable

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.Button
         ↳ android.widget.CompoundButton
           ↳ android.widget.CheckBox
             ↳ androidx.appcompat.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 R.styleable.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:

  • 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 and app:chipIconEnabled - Sets the icon of the chip. Usually on the left.
  • app:checkedIcon and app:checkedIconEnabled - Sets a custom icon to use when checked. Usually on the left.
  • app:closeIcon and app:closeIconEnabled - Sets a custom icon that the user can click to close. Usually on the right.

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

For proper rendering of the ancestor TextView in RTL mode, call setLayoutDirection(int) with View.LAYOUT_DIRECTION_LOCALE. By default, TextView's layout rendering sets the text padding in LTR on initial rendering and it only renders correctly after the layout has been invalidated so you need to ensure that initial rendering has the correct layout.

For more information, see the component developer guidance and design guidelines.

See also:

Summary

Inherited constants

int AUTO_SIZE_TEXT_TYPE_NONE

int AUTO_SIZE_TEXT_TYPE_UNIFORM

int FOCUSED_SEARCH_RESULT_INDEX_NONE

int ACCESSIBILITY_DATA_SENSITIVE_AUTO

int ACCESSIBILITY_DATA_SENSITIVE_NO

int ACCESSIBILITY_DATA_SENSITIVE_YES

int ACCESSIBILITY_LIVE_REGION_ASSERTIVE

int ACCESSIBILITY_LIVE_REGION_NONE

int ACCESSIBILITY_LIVE_REGION_POLITE

int AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

String AUTOFILL_HINT_CREDIT_CARD_NUMBER

String AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

String AUTOFILL_HINT_EMAIL_ADDRESS

String AUTOFILL_HINT_NAME

String AUTOFILL_HINT_PASSWORD

String AUTOFILL_HINT_PHONE

String AUTOFILL_HINT_POSTAL_ADDRESS

String AUTOFILL_HINT_POSTAL_CODE

String AUTOFILL_HINT_USERNAME

int AUTOFILL_TYPE_DATE

int AUTOFILL_TYPE_LIST

int AUTOFILL_TYPE_NONE

int AUTOFILL_TYPE_TEXT

int AUTOFILL_TYPE_TOGGLE

int DRAG_FLAG_ACCESSIBILITY_ACTION

int DRAG_FLAG_GLOBAL

int DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION

int DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION

int DRAG_FLAG_GLOBAL_URI_READ

int DRAG_FLAG_GLOBAL_URI_WRITE

int DRAG_FLAG_OPAQUE

int DRAWING_CACHE_QUALITY_AUTO

int DRAWING_CACHE_QUALITY_HIGH

int DRAWING_CACHE_QUALITY_LOW

int FIND_VIEWS_WITH_CONTENT_DESCRIPTION

int FIND_VIEWS_WITH_TEXT

int FOCUSABLE

int FOCUSABLES_ALL

int FOCUSABLES_TOUCH_MODE

int FOCUSABLE_AUTO

int FOCUS_BACKWARD

int FOCUS_DOWN

int FOCUS_FORWARD

int FOCUS_LEFT

int FOCUS_RIGHT

int FOCUS_UP

int GONE

int HAPTIC_FEEDBACK_ENABLED

int IMPORTANT_FOR_ACCESSIBILITY_AUTO

int IMPORTANT_FOR_ACCESSIBILITY_NO

int IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS

int IMPORTANT_FOR_ACCESSIBILITY_YES

int IMPORTANT_FOR_AUTOFILL_AUTO

int IMPORTANT_FOR_AUTOFILL_NO

int IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS

int IMPORTANT_FOR_AUTOFILL_YES

int IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS

int IMPORTANT_FOR_CONTENT_CAPTURE_AUTO

int IMPORTANT_FOR_CONTENT_CAPTURE_NO

int IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS

int IMPORTANT_FOR_CONTENT_CAPTURE_YES

int IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS

int INVISIBLE

int KEEP_SCREEN_ON

int LAYER_TYPE_HARDWARE

int LAYER_TYPE_NONE

int LAYER_TYPE_SOFTWARE

int LAYOUT_DIRECTION_INHERIT

int LAYOUT_DIRECTION_LOCALE

int LAYOUT_DIRECTION_LTR

int LAYOUT_DIRECTION_RTL

int MEASURED_HEIGHT_STATE_SHIFT

int MEASURED_SIZE_MASK

int MEASURED_STATE_MASK

int MEASURED_STATE_TOO_SMALL

int NOT_FOCUSABLE

int NO_ID

int OVER_SCROLL_ALWAYS

int OVER_SCROLL_IF_CONTENT_SCROLLS

int OVER_SCROLL_NEVER

int SCREEN_STATE_OFF

int SCREEN_STATE_ON

int SCROLLBARS_INSIDE_INSET

int SCROLLBARS_INSIDE_OVERLAY

int SCROLLBARS_OUTSIDE_INSET

int SCROLLBARS_OUTSIDE_OVERLAY

int SCROLLBAR_POSITION_DEFAULT

int SCROLLBAR_POSITION_LEFT

int SCROLLBAR_POSITION_RIGHT

int SCROLL_AXIS_HORIZONTAL

int SCROLL_AXIS_NONE

int SCROLL_AXIS_VERTICAL

int SCROLL_CAPTURE_HINT_AUTO

int SCROLL_CAPTURE_HINT_EXCLUDE

int SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS

int SCROLL_CAPTURE_HINT_INCLUDE

int SCROLL_INDICATOR_BOTTOM

int SCROLL_INDICATOR_END

int SCROLL_INDICATOR_LEFT

int SCROLL_INDICATOR_RIGHT

int SCROLL_INDICATOR_START

int SCROLL_INDICATOR_TOP

int SOUND_EFFECTS_ENABLED

int STATUS_BAR_HIDDEN

int STATUS_BAR_VISIBLE

int SYSTEM_UI_FLAG_FULLSCREEN

int SYSTEM_UI_FLAG_HIDE_NAVIGATION

int SYSTEM_UI_FLAG_IMMERSIVE

int SYSTEM_UI_FLAG_IMMERSIVE_STICKY

int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN

int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

int SYSTEM_UI_FLAG_LAYOUT_STABLE

int SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR

int SYSTEM_UI_FLAG_LIGHT_STATUS_BAR

int SYSTEM_UI_FLAG_LOW_PROFILE

int SYSTEM_UI_FLAG_VISIBLE

int SYSTEM_UI_LAYOUT_FLAGS

int TEXT_ALIGNMENT_CENTER

int TEXT_ALIGNMENT_GRAVITY

int TEXT_ALIGNMENT_INHERIT

int TEXT_ALIGNMENT_TEXT_END

int TEXT_ALIGNMENT_TEXT_START

int TEXT_ALIGNMENT_VIEW_END

int TEXT_ALIGNMENT_VIEW_START

int TEXT_DIRECTION_ANY_RTL

int TEXT_DIRECTION_FIRST_STRONG

int TEXT_DIRECTION_FIRST_STRONG_LTR

int TEXT_DIRECTION_FIRST_STRONG_RTL

int TEXT_DIRECTION_INHERIT

int TEXT_DIRECTION_LOCALE

int TEXT_DIRECTION_LTR

int TEXT_DIRECTION_RTL

String VIEW_LOG_TAG

int VISIBLE

Inherited fields

public static final Property<View, Float> ALPHA

protected static final int[] EMPTY_STATE_SET

protected static final int[] ENABLED_FOCUSED_SELECTED_STATE_SET

protected static final int[] ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] ENABLED_FOCUSED_STATE_SET

protected static final int[] ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET

protected static final int[] ENABLED_SELECTED_STATE_SET

protected static final int[] ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] ENABLED_STATE_SET

protected static final int[] ENABLED_WINDOW_FOCUSED_STATE_SET

protected static final int[] FOCUSED_SELECTED_STATE_SET

protected static final int[] FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] FOCUSED_STATE_SET

protected static final int[] FOCUSED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET

protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_ENABLED_FOCUSED_STATE_SET

protected static final int[] PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_ENABLED_SELECTED_STATE_SET

protected static final int[] PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_ENABLED_STATE_SET

protected static final int[] PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_FOCUSED_SELECTED_STATE_SET

protected static final int[] PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_FOCUSED_STATE_SET

protected static final int[] PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_SELECTED_STATE_SET

protected static final int[] PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET

protected static final int[] PRESSED_STATE_SET

protected static final int[] PRESSED_WINDOW_FOCUSED_STATE_SET

public static final Property<View, Float> ROTATION

public static final Property<View, Float> ROTATION_X

public static final Property<View, Float> ROTATION_Y

public static final Property<View, Float> SCALE_X

public static final Property<View, Float> SCALE_Y

protected static final int[] SELECTED_STATE_SET

protected static final int[] SELECTED_WINDOW_FOCUSED_STATE_SET

public static final Property<View, Float> TRANSLATION_X

public static final Property<View, Float> TRANSLATION_Y

public static final Property<View, Float> TRANSLATION_Z

protected static final int[] WINDOW_FOCUSED_STATE_SET

public static final Property<View, Float> X

public static final Property<View, Float> Y

public static final Property<View, Float> Z

Public constructors

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

Public methods

boolean dispatchKeyEvent(KeyEvent event)
boolean ensureAccessibleTouchTarget(int minTargetPx)

Extends the touch target of this chip using a InsetDrawable if chip's intrinsic width / height is smaller than the minTargetPx.

CharSequence getAccessibilityClassName()
Drawable getBackgroundDrawable()
Drawable getCheckedIcon()

Returns this chip's checked icon.

ColorStateList getCheckedIconTint()

Returns the ColorStateList used to tint the checked icon.

ColorStateList getChipBackgroundColor()

Returns this chip's background color.

float getChipCornerRadius()

Returns this chip's corner radius.

Drawable getChipDrawable()

Returns the ChipDrawable backing this chip.

float getChipEndPadding()

Returns this chip's end padding.

Drawable getChipIcon()

Returns this chip's icon.

float getChipIconSize()

Returns this chip's icon size.

ColorStateList getChipIconTint()

Returns the ColorStateList used to tint the chip icon.

float getChipMinHeight()

Returns this chip's minimum height.

float getChipStartPadding()

Returns this chip's start padding.

ColorStateList getChipStrokeColor()

Returns this chip's stroke color.

float getChipStrokeWidth()

Returns this chip's stroke width.

CharSequence getChipText()

This method is deprecated. Use TextView.getText() instead.

Drawable getCloseIcon()

Returns this chip's close icon.

CharSequence getCloseIconContentDescription()

Returns this chip's close icon content description.

float getCloseIconEndPadding()

Returns the end padding for this chip's close icon.

float getCloseIconSize()

Returns this chip's close icon size.

float getCloseIconStartPadding()

Returns the start padding for this chip's close icon.

ColorStateList getCloseIconTint()

Returns the tint color for this chip's close icon.

TextUtils.TruncateAt getEllipsize()
void getFocusedRect(Rect r)
MotionSpec getHideMotionSpec()

Returns this chip's hide motion spec.

float getIconEndPadding()

Returns the end padding for this chip's icon.

float getIconStartPadding()

Returns the start padding for this chip's icon.

ColorStateList getRippleColor()

Returns this chip's ripple color.

ShapeAppearanceModel getShapeAppearanceModel()

Returns the ShapeAppearanceModel used for the shape definition.

MotionSpec getShowMotionSpec()

Returns this chip's show motion spec.

float getTextEndPadding()

Returns the end padding for this chip's text.

float getTextStartPadding()

Returns the start padding for this chip's text.

boolean isCheckable()

Returns whether this chip is checkable.

boolean isCheckedIconEnabled()

This method is deprecated. Use isCheckedIconVisible() instead.

boolean isCheckedIconVisible()

Returns whether this chip's checked icon is visible.

boolean isChipIconEnabled()

This method is deprecated. Use isChipIconVisible() instead.

boolean isChipIconVisible()

Returns whether this chip's icon is visible.

boolean isCloseIconEnabled()

This method is deprecated. Use isCloseIconVisible() instead.

boolean isCloseIconVisible()

Returns whether this chip's close icon is visible.

void onChipDrawableSizeChange()

Handles a change in the ChipDrawable's size.

boolean onHoverEvent(MotionEvent event)
void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info)
PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex)
void onRtlPropertiesChanged(int layoutDirection)
boolean onTouchEvent(MotionEvent event)
boolean performCloseIconClick()

Call this chip's close icon click listener, if it is defined.

void setAccessibilityClassName(CharSequence className)

Sets this chip's accessibility class name.

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)

Sets whether this chip is checkable.

void setCheckableResource(int id)

Sets whether this chip is checkable using a resource id.

void setChecked(boolean checked)
void setCheckedIcon(Drawable checkedIcon)

Sets this chip's checked icon.

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)

Sets this chip's checked icon using a resource id.

void setCheckedIconTint(ColorStateList checkedIconTint)

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

void setCheckedIconTintResource(int id)

Sets this chip's checked icon's color tint using a resource id.

void setCheckedIconVisible(int id)

Sets whether this chip's checked icon is visible using a resource id.

void setCheckedIconVisible(boolean checkedIconVisible)

Sets whether this chip's checked icon is visible.

void setChipBackgroundColor(ColorStateList chipBackgroundColor)

Sets this chip's background color.

void setChipBackgroundColorResource(int id)

Sets this chip's background color using a resource id.

void setChipCornerRadius(float chipCornerRadius)

This method is deprecated. call ShapeAppearanceModel.withCornerSize(float) or call ShapeAppearanceModel.toBuilder() on the getShapeAppearanceModel(), modify the shape using the builder and then call setShapeAppearanceModel(ShapeAppearanceModel).

void setChipCornerRadiusResource(int id)

This method is deprecated. call ShapeAppearanceModel.withCornerSize(float) or call ShapeAppearanceModel.toBuilder() on the getShapeAppearanceModel(), modify the shape using the builder and then call setShapeAppearanceModel(ShapeAppearanceModel).

void setChipDrawable(ChipDrawable drawable)

Sets the ChipDrawable backing this chip.

void setChipEndPadding(float chipEndPadding)

Sets this chip's end padding.

void setChipEndPaddingResource(int id)

Sets this chip's end padding using a resource id.

void setChipIcon(Drawable chipIcon)

Sets this chip's icon.

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)

Sets this chip's icon using a resource id.

void setChipIconSize(float chipIconSize)

Sets this chip icon's size.

void setChipIconSizeResource(int id)

Sets this chip icon's size using a resource id.

void setChipIconTint(ColorStateList chipIconTint)

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

void setChipIconTintResource(int id)

Sets this chip icon's color tint using a resource id.

void setChipIconVisible(int id)

Sets the visibility of this chip's icon using a resource id.

void setChipIconVisible(boolean chipIconVisible)

Sets whether this chip's icon is visible.

void setChipMinHeight(float minHeight)

Sets this chip's minimum height.

void setChipMinHeightResource(int id)

Sets this chip's minimum height using a resource id.

void setChipStartPadding(float chipStartPadding)

Sets this chip's start padding.

void setChipStartPaddingResource(int id)

Sets this chip's start padding using a resource id.

void setChipStrokeColor(ColorStateList chipStrokeColor)

Sets this chip's stroke color.

void setChipStrokeColorResource(int id)

Sets this chip's stroke color using a resource id.

void setChipStrokeWidth(float chipStrokeWidth)

Sets this chip's stroke width.

void setChipStrokeWidthResource(int id)

Sets this chip's stroke width using a resource id.

void setChipText(CharSequence chipText)

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

void setChipTextResource(int id)

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

void setCloseIcon(Drawable closeIcon)

Sets this chip's close icon.

void setCloseIconContentDescription(CharSequence closeIconContentDescription)

Sets the content description for this chip's close icon.

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)

Sets the end padding for this chip's close icon.

void setCloseIconEndPaddingResource(int id)

Sets the end padding for this chip's close icon using a resource id.

void setCloseIconResource(int id)

Sets this chip's close icon using a resource id.

void setCloseIconSize(float closeIconSize)

Sets this chip's close icon size.

void setCloseIconSizeResource(int id)

Sets this chip's close icon size using a resource id.

void setCloseIconStartPadding(float closeIconStartPadding)

Sets the start padding for this chip's close icon.

void setCloseIconStartPaddingResource(int id)

Sets the start padding for this chip's close icon using a resource id.

void setCloseIconTint(ColorStateList closeIconTint)

Sets the tint color for this chip's close icon.

void setCloseIconTintResource(int id)

Sets the tint color for this chip's close icon using a resource id.

void setCloseIconVisible(boolean closeIconVisible)

Sets whether this chip close icon is visible.

void setCloseIconVisible(int id)

Sets whether this chip close icon is visible using a resource 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 setElevation(float elevation)
void setEllipsize(TextUtils.TruncateAt where)
void setEnsureMinTouchTargetSize(boolean flag)

Sets whether this chip should expand its bounds (if needed) to meet the minimum touch target size.

void setGravity(int gravity)
void setHideMotionSpec(MotionSpec hideMotionSpec)

Sets this chip's hide motion spec.

void setHideMotionSpecResource(int id)

Sets this chip's hide motion spec using a resource id.

void setIconEndPadding(float iconEndPadding)

Sets the end padding for this chip's icon.

void setIconEndPaddingResource(int id)

Sets the end padding for this chip's icon using a resource id.

void setIconStartPadding(float iconStartPadding)

Sets this chip's icon start padding.

void setIconStartPaddingResource(int id)

Sets the start padding for this chip's icon using a resource id.

void setLayoutDirection(int layoutDirection)
void setLines(int lines)
void setMaxLines(int maxLines)
void setMaxWidth(int maxWidth)
void setMinLines(int minLines)
void setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener listener)
void setOnCloseIconClickListener(View.OnClickListener listener)

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

void setRippleColor(ColorStateList rippleColor)

Sets this chip's ripple color.

void setRippleColorResource(int id)

Sets this chip's ripple color using a resource id.

void setShapeAppearanceModel(ShapeAppearanceModel shapeAppearanceModel)

Sets the ShapeAppearanceModel that defines the shape.

void setShowMotionSpec(MotionSpec showMotionSpec)

Sets this chip's show motion spec.

void setShowMotionSpecResource(int id)

Sets this chip's show motion spec using a resource id.

void setSingleLine(boolean singleLine)
void setText(CharSequence text, TextView.BufferType type)
void setTextAppearance(TextAppearance textAppearance)

Sets this chip's text appearance.

void setTextAppearance(int resId)
void setTextAppearance(Context context, int resId)
void setTextAppearanceResource(int id)

Sets this chip's text appearance using a resource id.

void setTextEndPadding(float textEndPadding)

Sets the end padding for this chip's text.

void setTextEndPaddingResource(int id)

Sets the end padding for this chip's text using a resource id.

void setTextSize(int unit, float size)
void setTextStartPadding(float textStartPadding)

Sets the start padding for this chip's text.

void setTextStartPaddingResource(int id)

Sets the start padding for this chip's text using a resource id.

boolean shouldEnsureMinTouchTargetSize()

Returns whether this chip will expand its bounds (if needed) to meet the minimum touch target size.

Protected methods

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

Inherited methods

void drawableStateChanged()
int getCompoundPaddingLeft()
ColorStateList getSupportBackgroundTintList()
PorterDuff.Mode getSupportBackgroundTintMode()
ColorStateList getSupportButtonTintList()
PorterDuff.Mode getSupportButtonTintMode()
ColorStateList getSupportCompoundDrawablesTintList()
PorterDuff.Mode getSupportCompoundDrawablesTintMode()
boolean isEmojiCompatEnabled()
void setAllCaps(boolean arg0)
void setBackgroundDrawable(Drawable arg0)
void setBackgroundResource(int arg0)
void setButtonDrawable(int arg0)
void setButtonDrawable(Drawable arg0)
void setCompoundDrawables(Drawable arg0, Drawable arg1, Drawable arg2, Drawable arg3)
void setCompoundDrawablesRelative(Drawable arg0, Drawable arg1, Drawable arg2, Drawable arg3)
void setEmojiCompatEnabled(boolean arg0)
void setFilters(InputFilter[] arg0)
void setSupportBackgroundTintList(ColorStateList arg0)
void setSupportBackgroundTintMode(PorterDuff.Mode arg0)
void setSupportButtonTintList(ColorStateList arg0)
void setSupportButtonTintMode(PorterDuff.Mode arg0)
void setSupportCompoundDrawablesTintList(ColorStateList arg0)
void setSupportCompoundDrawablesTintMode(PorterDuff.Mode arg0)
CharSequence getAccessibilityClassName()
void autofill(AutofillValue arg0)
void drawableHotspotChanged(float arg0, float arg1)
void drawableStateChanged()
CharSequence getAccessibilityClassName()
int getAutofillType()
AutofillValue getAutofillValue()
Drawable getButtonDrawable()
BlendMode getButtonTintBlendMode()
ColorStateList getButtonTintList()
PorterDuff.Mode getButtonTintMode()
int getCompoundPaddingLeft()
int getCompoundPaddingRight()
boolean isChecked()
void jumpDrawablesToCurrentState()
int[] onCreateDrawableState(int arg0)
void onDraw(Canvas arg0)
void onRestoreInstanceState(Parcelable arg0)
Parcelable onSaveInstanceState()
boolean performClick()
void setButtonDrawable(int arg0)
void setButtonDrawable(Drawable arg0)
void setButtonIcon(Icon arg0)
void setButtonTintBlendMode(BlendMode arg0)
void setButtonTintList(ColorStateList arg0)
void setButtonTintMode(PorterDuff.Mode arg0)
void setChecked(boolean arg0)
void setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener arg0)
void setStateDescription(CharSequence arg0)
void toggle()
boolean verifyDrawable(Drawable arg0)
CharSequence getAccessibilityClassName()
PointerIcon onResolvePointerIcon(MotionEvent arg0, int arg1)
void addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo arg0, String arg1, Bundle arg2)
void addTextChangedListener(TextWatcher arg0)
final void append(CharSequence arg0)
void append(CharSequence arg0, int arg1, int arg2)
void autofill(AutofillValue arg0)
void beginBatchEdit()
boolean bringPointIntoView(int arg0)
boolean bringPointIntoView(int arg0, boolean arg1)
void cancelLongPress()
void clearComposingText()
int computeHorizontalScrollRange()
void computeScroll()
int computeVerticalScrollExtent()
int computeVerticalScrollRange()
void debug(int arg0)
boolean didTouchFocusSelect()
void drawableHotspotChanged(float arg0, float arg1)
void drawableStateChanged()
void endBatchEdit()
boolean extractText(ExtractedTextRequest arg0, ExtractedText arg1)
void findViewsWithText(ArrayList<View> arg0, CharSequence arg1, int arg2)
CharSequence getAccessibilityClassName()
final int getAutoLinkMask()
int getAutoSizeMaxTextSize()
int getAutoSizeMinTextSize()
int getAutoSizeStepGranularity()
int[] getAutoSizeTextAvailableSizes()
int getAutoSizeTextType()
String[] getAutofillHints()
int getAutofillType()
AutofillValue getAutofillValue()
int getBaseline()
int getBottomPaddingOffset()
int getBreakStrategy()
int getCompoundDrawablePadding()
BlendMode getCompoundDrawableTintBlendMode()
ColorStateList getCompoundDrawableTintList()
PorterDuff.Mode getCompoundDrawableTintMode()
Drawable[] getCompoundDrawables()
Drawable[] getCompoundDrawablesRelative()
int getCompoundPaddingBottom()
int getCompoundPaddingEnd()
int getCompoundPaddingLeft()
int getCompoundPaddingRight()
int getCompoundPaddingStart()
int getCompoundPaddingTop()
final int getCurrentHintTextColor()
final int getCurrentTextColor()
ActionMode.Callback getCustomInsertionActionModeCallback()
ActionMode.Callback getCustomSelectionActionModeCallback()
boolean getDefaultEditable()
MovementMethod getDefaultMovementMethod()
Editable getEditableText()
TextUtils.TruncateAt getEllipsize()
CharSequence getError()
int getExtendedPaddingBottom()
int getExtendedPaddingTop()
InputFilter[] getFilters()
int getFirstBaselineToTopHeight()
void getFocusedRect(Rect arg0)
int getFocusedSearchResultHighlightColor()
int getFocusedSearchResultIndex()
String getFontFeatureSettings()
String getFontVariationSettings()
boolean getFreezesText()
int getGravity()
int getHighlightColor()
Highlights getHighlights()
CharSequence getHint()
final ColorStateList getHintTextColors()
int getHyphenationFrequency()
int getImeActionId()
CharSequence getImeActionLabel()
LocaleList getImeHintLocales()
int getImeOptions()
boolean getIncludeFontPadding()
Bundle getInputExtras(boolean arg0)
int getInputType()
int getJustificationMode()
final KeyListener getKeyListener()
int getLastBaselineToBottomHeight()
final Layout getLayout()
float getLeftFadingEdgeStrength()
int getLeftPaddingOffset()
float getLetterSpacing()
int getLineBounds(int arg0, Rect arg1)
int getLineBreakStyle()
int getLineBreakWordStyle()
int getLineCount()
int getLineHeight()
float getLineSpacingExtra()
float getLineSpacingMultiplier()
final ColorStateList getLinkTextColors()
final boolean getLinksClickable()
int getMarqueeRepeatLimit()
int getMaxEms()
int getMaxHeight()
int getMaxLines()
int getMaxWidth()
int getMinEms()
int getMinHeight()
int getMinLines()
int getMinWidth()
final MovementMethod getMovementMethod()
int getOffsetForPosition(float arg0, float arg1)
TextPaint getPaint()
int getPaintFlags()
String getPrivateImeOptions()
float getRightFadingEdgeStrength()
int getRightPaddingOffset()
int getSearchResultHighlightColor()
int[] getSearchResultHighlights()
int getSelectionEnd()
int getSelectionStart()
int getShadowColor()
float getShadowDx()
float getShadowDy()
float getShadowRadius()
final boolean getShowSoftInputOnFocus()
CharSequence getText()
TextClassifier getTextClassifier()
final ColorStateList getTextColors()
Drawable getTextCursorDrawable()
TextDirectionHeuristic getTextDirectionHeuristic()
Locale getTextLocale()
LocaleList getTextLocales()
PrecomputedText.Params getTextMetricsParams()
float getTextScaleX()
Drawable getTextSelectHandle()
Drawable getTextSelectHandleLeft()
Drawable getTextSelectHandleRight()
float getTextSize()
int getTextSizeUnit()
int getTopPaddingOffset()
int getTotalPaddingBottom()
int getTotalPaddingEnd()
int getTotalPaddingLeft()
int getTotalPaddingRight()
int getTotalPaddingStart()
int getTotalPaddingTop()
final TransformationMethod getTransformationMethod()
Typeface getTypeface()
URLSpan[] getUrls()
boolean hasOverlappingRendering()
boolean hasSelection()
void invalidateDrawable(Drawable arg0)
boolean isAllCaps()
boolean isAutoHandwritingEnabled()
boolean isCursorVisible()
boolean isElegantTextHeight()
boolean isFallbackLineSpacing()
final boolean isHorizontallyScrollable()
boolean isInputMethodTarget()
boolean isPaddingOffsetRequired()
boolean isSingleLine()
boolean isSuggestionsEnabled()
boolean isTextSelectable()
void jumpDrawablesToCurrentState()
int length()
boolean moveCursorToVisibleOffset()
void onAttachedToWindow()
void onBeginBatchEdit()
boolean onCheckIsTextEditor()
void onCommitCompletion(CompletionInfo arg0)
void onCommitCorrection(CorrectionInfo arg0)
void onConfigurationChanged(Configuration arg0)
void onCreateContextMenu(ContextMenu arg0)
int[] onCreateDrawableState(int arg0)
InputConnection onCreateInputConnection(EditorInfo arg0)
void onCreateViewTranslationRequest(int[] arg0, Consumer<ViewTranslationRequest> arg1)
boolean onDragEvent(DragEvent arg0)
void onDraw(Canvas arg0)
void onEditorAction(int arg0)
void onEndBatchEdit()
void onFocusChanged(boolean arg0, int arg1, Rect arg2)
boolean onGenericMotionEvent(MotionEvent arg0)
boolean onKeyDown(int arg0, KeyEvent arg1)
boolean onKeyMultiple(int arg0, int arg1, KeyEvent arg2)
boolean onKeyPreIme(int arg0, KeyEvent arg1)
boolean onKeyShortcut(int arg0, KeyEvent arg1)
boolean onKeyUp(int arg0, KeyEvent arg1)
void onLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4)
void onMeasure(int arg0, int arg1)
boolean onPreDraw()
boolean onPrivateIMECommand(String arg0, Bundle arg1)
ContentInfo onReceiveContent(ContentInfo arg0)
PointerIcon onResolvePointerIcon(MotionEvent arg0, int arg1)
void onRestoreInstanceState(Parcelable arg0)
void onRtlPropertiesChanged(int arg0)
Parcelable onSaveInstanceState()
void onScreenStateChanged(int arg0)
void onScrollChanged(int arg0, int arg1, int arg2, int arg3)
void onSelectionChanged(int arg0, int arg1)
void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3)
boolean onTextContextMenuItem(int arg0)
boolean onTouchEvent(MotionEvent arg0)
boolean onTrackballEvent(MotionEvent arg0)
void onVisibilityAggregated(boolean arg0)
void onVisibilityChanged(View arg0, int arg1)
void onWindowFocusChanged(boolean arg0)
boolean performLongClick()
void removeTextChangedListener(TextWatcher arg0)
void sendAccessibilityEventUnchecked(AccessibilityEvent arg0)
void setAllCaps(boolean arg0)
final void setAutoLinkMask(int arg0)
void setAutoSizeTextTypeUniformWithConfiguration(int arg0, int arg1, int arg2, int arg3)
void setAutoSizeTextTypeUniformWithPresetSizes(int[] arg0, int arg1)
void setAutoSizeTextTypeWithDefaults(int arg0)
void setBreakStrategy(int arg0)
void setCompoundDrawablePadding(int arg0)
void setCompoundDrawableTintBlendMode(BlendMode arg0)
void setCompoundDrawableTintList(ColorStateList arg0)
void setCompoundDrawableTintMode(PorterDuff.Mode arg0)
void setCompoundDrawables(Drawable arg0, Drawable arg1, Drawable arg2, Drawable arg3)
void setCompoundDrawablesRelative(Drawable arg0, Drawable arg1, Drawable arg2, Drawable arg3)
void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable arg0, Drawable arg1, Drawable arg2, Drawable arg3)
void setCompoundDrawablesRelativeWithIntrinsicBounds(int arg0, int arg1, int arg2, int arg3)
void setCompoundDrawablesWithIntrinsicBounds(Drawable arg0, Drawable arg1, Drawable arg2, Drawable arg3)
void setCompoundDrawablesWithIntrinsicBounds(int arg0, int arg1, int arg2, int arg3)
void setCursorVisible(boolean arg0)
void setCustomInsertionActionModeCallback(ActionMode.Callback arg0)
void setCustomSelectionActionModeCallback(ActionMode.Callback arg0)
final void setEditableFactory(Editable.Factory arg0)
void setElegantTextHeight(boolean arg0)
void setEllipsize(TextUtils.TruncateAt arg0)
void setEms(int arg0)
void setEnabled(boolean arg0)
void setError(CharSequence arg0)
void setError(CharSequence arg0, Drawable arg1)
void setExtractedText(ExtractedText arg0)
void setFallbackLineSpacing(boolean arg0)
void setFilters(InputFilter[] arg0)
void setFirstBaselineToTopHeight(int arg0)
void setFocusedSearchResultHighlightColor(int arg0)
void setFocusedSearchResultIndex(int arg0)
void setFontFeatureSettings(String arg0)
boolean setFontVariationSettings(String arg0)
boolean setFrame(int arg0, int arg1, int arg2, int arg3)
void setFreezesText(boolean arg0)
void setGravity(int arg0)
void setHeight(int arg0)
void setHighlightColor(int arg0)
void setHighlights(Highlights arg0)
final void setHint(CharSequence arg0)
final void setHint(int arg0)
final void setHintTextColor(ColorStateList arg0)
final void setHintTextColor(int arg0)
void setHorizontallyScrolling(boolean arg0)
void setHyphenationFrequency(int arg0)
void setImeActionLabel(CharSequence arg0, int arg1)
void setImeHintLocales(LocaleList arg0)
void setImeOptions(int arg0)
void setIncludeFontPadding(boolean arg0)
void setInputExtras(int arg0)
void setInputType(int arg0)
void setJustificationMode(int arg0)
void setKeyListener(KeyListener arg0)
void setLastBaselineToBottomHeight(int arg0)
void setLetterSpacing(float arg0)
void setLineBreakStyle(int arg0)
void setLineBreakWordStyle(int arg0)
void setLineHeight(int arg0, float arg1)
void setLineHeight(int arg0)
void setLineSpacing(float arg0, float arg1)
void setLines(int arg0)
final void setLinkTextColor(ColorStateList arg0)
final void setLinkTextColor(int arg0)
final void setLinksClickable(boolean arg0)
void setMarqueeRepeatLimit(int arg0)
void setMaxEms(int arg0)
void setMaxHeight(int arg0)
void setMaxLines(int arg0)
void setMaxWidth(int arg0)
void setMinEms(int arg0)
void setMinHeight(int arg0)
void setMinLines(int arg0)
void setMinWidth(int arg0)
final void setMovementMethod(MovementMethod arg0)
void setOnEditorActionListener(TextView.OnEditorActionListener arg0)
void setPadding(int arg0, int arg1, int arg2, int arg3)
void setPaddingRelative(int arg0, int arg1, int arg2, int arg3)
void setPaintFlags(int arg0)
void setPrivateImeOptions(String arg0)
void setRawInputType(int arg0)
void setScroller(Scroller arg0)
void setSearchResultHighlightColor(int arg0)
void setSearchResultHighlights(int... arg0)
void setSelectAllOnFocus(boolean arg0)
void setSelected(boolean arg0)
void setShadowLayer(float arg0, float arg1, float arg2, int arg3)
final void setShowSoftInputOnFocus(boolean arg0)
void setSingleLine(boolean arg0)
void setSingleLine()
final void setSpannableFactory(Spannable.Factory arg0)
final void setText(int arg0)
final void setText(CharSequence arg0)
void setText(CharSequence arg0, TextView.BufferType arg1)
final void setText(int arg0, TextView.BufferType arg1)
final void setText(char[] arg0, int arg1, int arg2)
void setTextAppearance(Context arg0, int arg1)
void setTextAppearance(int arg0)
void setTextClassifier(TextClassifier arg0)
void setTextColor(int arg0)
void setTextColor(ColorStateList arg0)
void setTextCursorDrawable(Drawable arg0)
void setTextCursorDrawable(int arg0)
void setTextIsSelectable(boolean arg0)
final void setTextKeepState(CharSequence arg0)
final void setTextKeepState(CharSequence arg0, TextView.BufferType arg1)
void setTextLocale(Locale arg0)
void setTextLocales(LocaleList arg0)
void setTextMetricsParams(PrecomputedText.Params arg0)
void setTextScaleX(float arg0)
void setTextSelectHandle(int arg0)
void setTextSelectHandle(Drawable arg0)
void setTextSelectHandleLeft(int arg0)
void setTextSelectHandleLeft(Drawable arg0)
void setTextSelectHandleRight(Drawable arg0)
void setTextSelectHandleRight(int arg0)
void setTextSize(int arg0, float arg1)
void setTextSize(float arg0)
final void setTransformationMethod(TransformationMethod arg0)
void setTypeface(Typeface arg0)
void setTypeface(Typeface arg0, int arg1)
void setWidth(int arg0)
boolean showContextMenu()
boolean showContextMenu(float arg0, float arg1)
boolean verifyDrawable(Drawable arg0)
void addChildrenForAccessibility(ArrayList<View> arg0)
void addExtraDataToAccessibilityNodeInfo(AccessibilityNodeInfo arg0, String arg1, Bundle arg2)
void addFocusables(ArrayList<View> arg0, int arg1)
void addFocusables(ArrayList<View> arg0, int arg1, int arg2)
void addKeyboardNavigationClusters(Collection<View> arg0, int arg1)
void addOnAttachStateChangeListener(View.OnAttachStateChangeListener arg0)
void addOnLayoutChangeListener(View.OnLayoutChangeListener arg0)
void addOnUnhandledKeyEventListener(View.OnUnhandledKeyEventListener arg0)
void addTouchables(ArrayList<View> arg0)
ViewPropertyAnimator animate()
void announceForAccessibility(CharSequence arg0)
void autofill(AutofillValue arg0)
void autofill(SparseArray<AutofillValue> arg0)
boolean awakenScrollBars(int arg0, boolean arg1)
boolean awakenScrollBars(int arg0)
boolean awakenScrollBars()
void bringToFront()
void buildDrawingCache(boolean arg0)
void buildDrawingCache()
void buildLayer()
boolean callOnClick()
boolean canResolveLayoutDirection()
boolean canResolveTextAlignment()
boolean canResolveTextDirection()
boolean canScrollHorizontally(int arg0)
boolean canScrollVertically(int arg0)
final void cancelDragAndDrop()
void cancelLongPress()
final void cancelPendingInputEvents()
boolean checkInputConnectionProxy(View arg0)
void clearAnimation()
void clearFocus()
void clearViewTranslationCallback()
static int combineMeasuredStates(int arg0, int arg1)
int computeHorizontalScrollExtent()
int computeHorizontalScrollOffset()
int computeHorizontalScrollRange()
void computeScroll()
WindowInsets computeSystemWindowInsets(WindowInsets arg0, Rect arg1)
int computeVerticalScrollExtent()
int computeVerticalScrollOffset()
int computeVerticalScrollRange()
AccessibilityNodeInfo createAccessibilityNodeInfo()
void createContextMenu(ContextMenu arg0)
void destroyDrawingCache()
WindowInsets dispatchApplyWindowInsets(WindowInsets arg0)
boolean dispatchCapturedPointerEvent(MotionEvent arg0)
void dispatchConfigurationChanged(Configuration arg0)
void dispatchCreateViewTranslationRequest(Map<AutofillId, long[]> arg0, int[] arg1, TranslationCapability arg2, List<ViewTranslationRequest> arg3)
void dispatchDisplayHint(int arg0)
boolean dispatchDragEvent(DragEvent arg0)
void dispatchDraw(Canvas arg0)
void dispatchDrawableHotspotChanged(float arg0, float arg1)
void dispatchFinishTemporaryDetach()
boolean dispatchGenericFocusedEvent(MotionEvent arg0)
boolean dispatchGenericMotionEvent(MotionEvent arg0)
boolean dispatchGenericPointerEvent(MotionEvent arg0)
boolean dispatchHoverEvent(MotionEvent arg0)
boolean dispatchKeyEvent(KeyEvent arg0)
boolean dispatchKeyEventPreIme(KeyEvent arg0)
boolean dispatchKeyShortcutEvent(KeyEvent arg0)
boolean dispatchNestedFling(float arg0, float arg1, boolean arg2)
boolean dispatchNestedPreFling(float arg0, float arg1)
boolean dispatchNestedPrePerformAccessibilityAction(int arg0, Bundle arg1)
boolean dispatchNestedPreScroll(int arg0, int arg1, int[] arg2, int[] arg3)
boolean dispatchNestedScroll(int arg0, int arg1, int arg2, int arg3, int[] arg4)
void dispatchPointerCaptureChanged(boolean arg0)
boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent arg0)
void dispatchProvideAutofillStructure(ViewStructure arg0, int arg1)
void dispatchProvideStructure(ViewStructure arg0)
void dispatchRestoreInstanceState(SparseArray<Parcelable> arg0)
void dispatchSaveInstanceState(SparseArray<Parcelable> arg0)
void dispatchScrollCaptureSearch(Rect arg0, Point arg1, Consumer<ScrollCaptureTarget> arg2)
void dispatchSetActivated(boolean arg0)
void dispatchSetPressed(boolean arg0)
void dispatchSetSelected(boolean arg0)
void dispatchStartTemporaryDetach()
void dispatchSystemUiVisibilityChanged(int arg0)
boolean dispatchTouchEvent(MotionEvent arg0)
boolean dispatchTrackballEvent(MotionEvent arg0)
boolean dispatchUnhandledMove(View arg0, int arg1)
void dispatchVisibilityChanged(View arg0, int arg1)
void dispatchWindowFocusChanged(boolean arg0)
void dispatchWindowInsetsAnimationEnd(WindowInsetsAnimation arg0)
void dispatchWindowInsetsAnimationPrepare(WindowInsetsAnimation arg0)
WindowInsets dispatchWindowInsetsAnimationProgress(WindowInsets arg0, List<WindowInsetsAnimation> arg1)
WindowInsetsAnimation.Bounds dispatchWindowInsetsAnimationStart(WindowInsetsAnimation arg0, WindowInsetsAnimation.Bounds arg1)
void dispatchWindowSystemUiVisiblityChanged(int arg0)
void dispatchWindowVisibilityChanged(int arg0)
void draw(Canvas arg0)
void drawableHotspotChanged(float arg0, float arg1)
void drawableStateChanged()
View findFocus()
final OnBackInvokedDispatcher findOnBackInvokedDispatcher()
final <T extends View> T findViewById(int arg0)
final <T extends View> T findViewWithTag(Object arg0)
void findViewsWithText(ArrayList<View> arg0, CharSequence arg1, int arg2)
boolean fitSystemWindows(Rect arg0)
View focusSearch(int arg0)
void forceHasOverlappingRendering(boolean arg0)
void forceLayout()
boolean gatherTransparentRegion(Region arg0)
void generateDisplayHash(String arg0, Rect arg1, Executor arg2, DisplayHashResultCallback arg3)
static int generateViewId()
CharSequence getAccessibilityClassName()
View.AccessibilityDelegate getAccessibilityDelegate()
int getAccessibilityLiveRegion()
AccessibilityNodeProvider getAccessibilityNodeProvider()
CharSequence getAccessibilityPaneTitle()
int getAccessibilityTraversalAfter()
int getAccessibilityTraversalBefore()
String getAllowedHandwritingDelegatePackageName()
String getAllowedHandwritingDelegatorPackageName()
float getAlpha()
Animation getAnimation()
Matrix getAnimationMatrix()
IBinder getApplicationWindowToken()
int[] getAttributeResolutionStack(int arg0)
Map<Integer, Integer> getAttributeSourceResourceMap()
String[] getAutofillHints()
final AutofillId getAutofillId()
int getAutofillType()
AutofillValue getAutofillValue()
Drawable getBackground()
BlendMode getBackgroundTintBlendMode()
ColorStateList getBackgroundTintList()
PorterDuff.Mode getBackgroundTintMode()
int getBaseline()
final int getBottom()
float getBottomFadingEdgeStrength()
int getBottomPaddingOffset()
float getCameraDistance()
boolean getClipBounds(Rect arg0)
Rect getClipBounds()
final boolean getClipToOutline()
final ContentCaptureSession getContentCaptureSession()
CharSequence getContentDescription()
final Context getContext()
ContextMenu.ContextMenuInfo getContextMenuInfo()
final boolean getDefaultFocusHighlightEnabled()
static int getDefaultSize(int arg0, int arg1)
Display getDisplay()
final int[] getDrawableState()
Bitmap getDrawingCache()
Bitmap getDrawingCache(boolean arg0)
int getDrawingCacheBackgroundColor()
int getDrawingCacheQuality()
void getDrawingRect(Rect arg0)
long getDrawingTime()
float getElevation()
int getExplicitStyle()
boolean getFilterTouchesWhenObscured()
boolean getFitsSystemWindows()
int getFocusable()
ArrayList<View> getFocusables(int arg0)
void getFocusedRect(Rect arg0)
Drawable getForeground()
int getForegroundGravity()
BlendMode getForegroundTintBlendMode()
ColorStateList getForegroundTintList()
PorterDuff.Mode getForegroundTintMode()
final boolean getGlobalVisibleRect(Rect arg0)
boolean getGlobalVisibleRect(Rect arg0, Point arg1)
Handler getHandler()
float getHandwritingBoundsOffsetBottom()
float getHandwritingBoundsOffsetLeft()
float getHandwritingBoundsOffsetRight()
float getHandwritingBoundsOffsetTop()
Runnable getHandwritingDelegatorCallback()
final boolean getHasOverlappingRendering()
final int getHeight()
void getHitRect(Rect arg0)
int getHorizontalFadingEdgeLength()
int getHorizontalScrollbarHeight()
Drawable getHorizontalScrollbarThumbDrawable()
Drawable getHorizontalScrollbarTrackDrawable()
int getId()
int getImportantForAccessibility()
int getImportantForAutofill()
int getImportantForContentCapture()
boolean getKeepScreenOn()
KeyEvent.DispatcherState getKeyDispatcherState()
int getLabelFor()
int getLayerType()
int getLayoutDirection()
ViewGroup.LayoutParams getLayoutParams()
final int getLeft()
float getLeftFadingEdgeStrength()
int getLeftPaddingOffset()
final boolean getLocalVisibleRect(Rect arg0)
void getLocationInSurface(int[] arg0)
void getLocationInWindow(int[] arg0)
void getLocationOnScreen(int[] arg0)
Matrix getMatrix()
final int getMeasuredHeight()
final int getMeasuredHeightAndState()
final int getMeasuredState()
final int getMeasuredWidth()
final int getMeasuredWidthAndState()
int getMinimumHeight()
int getMinimumWidth()
int getNextClusterForwardId()
int getNextFocusDownId()
int getNextFocusForwardId()
int getNextFocusLeftId()
int getNextFocusRightId()
int getNextFocusUpId()
View.OnFocusChangeListener getOnFocusChangeListener()
int getOutlineAmbientShadowColor()
ViewOutlineProvider getOutlineProvider()
int getOutlineSpotShadowColor()
int getOverScrollMode()
ViewOverlay getOverlay()
int getPaddingBottom()
int getPaddingEnd()
int getPaddingLeft()
int getPaddingRight()
int getPaddingStart()
int getPaddingTop()
final ViewParent getParent()
ViewParent getParentForAccessibility()
float getPivotX()
float getPivotY()
PointerIcon getPointerIcon()
final List<Rect> getPreferKeepClearRects()
String[] getReceiveContentMimeTypes()
Resources getResources()
final boolean getRevealOnFocusHint()
final int getRight()
float getRightFadingEdgeStrength()
int getRightPaddingOffset()
AttachedSurfaceControl getRootSurfaceControl()
View getRootView()
WindowInsets getRootWindowInsets()
float getRotation()
float getRotationX()
float getRotationY()
float getScaleX()
float getScaleY()
int getScrollBarDefaultDelayBeforeFade()
int getScrollBarFadeDuration()
int getScrollBarSize()
int getScrollBarStyle()
int getScrollCaptureHint()
int getScrollIndicators()
final int getScrollX()
final int getScrollY()
int getSolidColor()
int getSourceLayoutResId()
final CharSequence getStateDescription()
StateListAnimator getStateListAnimator()
int getSuggestedMinimumHeight()
int getSuggestedMinimumWidth()
List<Rect> getSystemGestureExclusionRects()
int getSystemUiVisibility()
Object getTag()
Object getTag(int arg0)
int getTextAlignment()
int getTextDirection()
CharSequence getTooltipText()
final int getTop()
float getTopFadingEdgeStrength()
int getTopPaddingOffset()
TouchDelegate getTouchDelegate()
ArrayList<View> getTouchables()
float getTransitionAlpha()
String getTransitionName()
float getTranslationX()
float getTranslationY()
float getTranslationZ()
long getUniqueDrawingId()
int getVerticalFadingEdgeLength()
int getVerticalScrollbarPosition()
Drawable getVerticalScrollbarThumbDrawable()
Drawable getVerticalScrollbarTrackDrawable()
int getVerticalScrollbarWidth()
ViewTranslationResponse getViewTranslationResponse()
ViewTreeObserver getViewTreeObserver()
int getVisibility()
final int getWidth()
int getWindowAttachCount()
WindowId getWindowId()
WindowInsetsController getWindowInsetsController()
int getWindowSystemUiVisibility()
IBinder getWindowToken()
int getWindowVisibility()
void getWindowVisibleDisplayFrame(Rect arg0)
float getX()
float getY()
float getZ()
boolean hasExplicitFocusable()
boolean hasFocus()
boolean hasFocusable()
boolean hasNestedScrollingParent()
boolean hasOnClickListeners()
boolean hasOnLongClickListeners()
boolean hasOverlappingRendering()
boolean hasPointerCapture()
boolean hasTransientState()
boolean hasWindowFocus()
static View inflate(Context arg0, int arg1, ViewGroup arg2)
void invalidate()
void invalidate(Rect arg0)
void invalidate(int arg0, int arg1, int arg2, int arg3)
void invalidateDrawable(Drawable arg0)
void invalidateOutline()
boolean isAccessibilityDataSensitive()
boolean isAccessibilityFocused()
boolean isAccessibilityHeading()
boolean isActivated()
boolean isAttachedToWindow()
boolean isAutoHandwritingEnabled()
boolean isClickable()
boolean isContextClickable()
boolean isCredential()
boolean isDirty()
boolean isDrawingCacheEnabled()
boolean isDuplicateParentStateEnabled()
boolean isEnabled()
final boolean isFocusable()
final boolean isFocusableInTouchMode()
boolean isFocused()
final boolean isFocusedByDefault()
boolean isForceDarkAllowed()
boolean isHandwritingDelegate()
boolean isHapticFeedbackEnabled()
boolean isHardwareAccelerated()
boolean isHorizontalFadingEdgeEnabled()
boolean isHorizontalScrollBarEnabled()
boolean isHovered()
boolean isImportantForAccessibility()
final boolean isImportantForAutofill()
final boolean isImportantForContentCapture()
boolean isInEditMode()
boolean isInLayout()
boolean isInTouchMode()
final boolean isKeyboardNavigationCluster()
boolean isLaidOut()
boolean isLayoutDirectionResolved()
boolean isLayoutRequested()
boolean isLongClickable()
boolean isNestedScrollingEnabled()
boolean isOpaque()
boolean isPaddingOffsetRequired()
boolean isPaddingRelative()
boolean isPivotSet()
final boolean isPreferKeepClear()
boolean isPressed()
boolean isSaveEnabled()
boolean isSaveFromParentEnabled()
boolean isScreenReaderFocusable()
boolean isScrollContainer()
boolean isScrollbarFadingEnabled()
boolean isSelected()
final boolean isShowingLayoutBounds()
boolean isShown()
boolean isSoundEffectsEnabled()
final boolean isTemporarilyDetached()
boolean isTextAlignmentResolved()
boolean isTextDirectionResolved()
boolean isVerticalFadingEdgeEnabled()
boolean isVerticalScrollBarEnabled()
boolean isVisibleToUserForAutofill(int arg0)
void jumpDrawablesToCurrentState()
View keyboardNavigationClusterSearch(View arg0, int arg1)
void layout(int arg0, int arg1, int arg2, int arg3)
final void measure(int arg0, int arg1)
static int[] mergeDrawableStates(int[] arg0, int[] arg1)
void offsetLeftAndRight(int arg0)
void offsetTopAndBottom(int arg0)
void onAnimationEnd()
void onAnimationStart()
WindowInsets onApplyWindowInsets(WindowInsets arg0)
void onAttachedToWindow()
void onCancelPendingInputEvents()
boolean onCapturedPointerEvent(MotionEvent arg0)
boolean onCheckIsTextEditor()
void onConfigurationChanged(Configuration arg0)
void onCreateContextMenu(ContextMenu arg0)
int[] onCreateDrawableState(int arg0)
InputConnection onCreateInputConnection(EditorInfo arg0)
void onCreateViewTranslationRequest(int[] arg0, Consumer<ViewTranslationRequest> arg1)
void onCreateVirtualViewTranslationRequests(long[] arg0, int[] arg1, Consumer<ViewTranslationRequest> arg2)
void onDetachedFromWindow()
void onDisplayHint(int arg0)
boolean onDragEvent(DragEvent arg0)
void onDraw(Canvas arg0)
void onDrawForeground(Canvas arg0)
final void onDrawScrollBars(Canvas arg0)
boolean onFilterTouchEventForSecurity(MotionEvent arg0)
void onFinishInflate()
void onFinishTemporaryDetach()
void onFocusChanged(boolean arg0, int arg1, Rect arg2)
boolean onGenericMotionEvent(MotionEvent arg0)
void onHoverChanged(boolean arg0)
boolean onHoverEvent(MotionEvent arg0)
void onInitializeAccessibilityEvent(AccessibilityEvent arg0)
void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo arg0)
boolean onKeyDown(int arg0, KeyEvent arg1)
boolean onKeyLongPress(int arg0, KeyEvent arg1)
boolean onKeyMultiple(int arg0, int arg1, KeyEvent arg2)
boolean onKeyPreIme(int arg0, KeyEvent arg1)
boolean onKeyShortcut(int arg0, KeyEvent arg1)
boolean onKeyUp(int arg0, KeyEvent arg1)
void onLayout(boolean arg0, int arg1, int arg2, int arg3, int arg4)
void onMeasure(int arg0, int arg1)
void onOverScrolled(int arg0, int arg1, boolean arg2, boolean arg3)
void onPointerCaptureChange(boolean arg0)
void onPopulateAccessibilityEvent(AccessibilityEvent arg0)
void onProvideAutofillStructure(ViewStructure arg0, int arg1)
void onProvideAutofillVirtualStructure(ViewStructure arg0, int arg1)
void onProvideContentCaptureStructure(ViewStructure arg0, int arg1)
void onProvideStructure(ViewStructure arg0)
void onProvideVirtualStructure(ViewStructure arg0)
ContentInfo onReceiveContent(ContentInfo arg0)
PointerIcon onResolvePointerIcon(MotionEvent arg0, int arg1)
void onRestoreInstanceState(Parcelable arg0)
void onRtlPropertiesChanged(int arg0)
Parcelable onSaveInstanceState()
void onScreenStateChanged(int arg0)
void onScrollCaptureSearch(Rect arg0, Point arg1, Consumer<ScrollCaptureTarget> arg2)
void onScrollChanged(int arg0, int arg1, int arg2, int arg3)
boolean onSetAlpha(int arg0)
void onSizeChanged(int arg0, int arg1, int arg2, int arg3)
void onStartTemporaryDetach()
boolean onTouchEvent(MotionEvent arg0)
boolean onTrackballEvent(MotionEvent arg0)
void onViewTranslationResponse(ViewTranslationResponse arg0)
void onVirtualViewTranslationResponses(LongSparseArray<ViewTranslationResponse> arg0)
void onVisibilityAggregated(boolean arg0)
void onVisibilityChanged(View arg0, int arg1)
void onWindowFocusChanged(boolean arg0)
void onWindowSystemUiVisibilityChanged(int arg0)
void onWindowVisibilityChanged(int arg0)
boolean overScrollBy(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, boolean arg8)
boolean performAccessibilityAction(int arg0, Bundle arg1)
boolean performClick()
boolean performContextClick(float arg0, float arg1)
boolean performContextClick()
boolean performHapticFeedback(int arg0)
boolean performHapticFeedback(int arg0, int arg1)
boolean performLongClick(float arg0, float arg1)
boolean performLongClick()
ContentInfo performReceiveContent(ContentInfo arg0)
void playSoundEffect(int arg0)
boolean post(Runnable arg0)
boolean postDelayed(Runnable arg0, long arg1)
void postInvalidate()
void postInvalidate(int arg0, int arg1, int arg2, int arg3)
void postInvalidateDelayed(long arg0, int arg1, int arg2, int arg3, int arg4)
void postInvalidateDelayed(long arg0)
void postInvalidateOnAnimation(int arg0, int arg1, int arg2, int arg3)
void postInvalidateOnAnimation()
void postOnAnimation(Runnable arg0)
void postOnAnimationDelayed(Runnable arg0, long arg1)
void refreshDrawableState()
void releasePointerCapture()
boolean removeCallbacks(Runnable arg0)
void removeOnAttachStateChangeListener(View.OnAttachStateChangeListener arg0)
void removeOnLayoutChangeListener(View.OnLayoutChangeListener arg0)
void removeOnUnhandledKeyEventListener(View.OnUnhandledKeyEventListener arg0)
void requestApplyInsets()
void requestFitSystemWindows()
final boolean requestFocus(int arg0)
final boolean requestFocus()
boolean requestFocus(int arg0, Rect arg1)
final boolean requestFocusFromTouch()
void requestLayout()
void requestPointerCapture()
boolean requestRectangleOnScreen(Rect arg0)
boolean requestRectangleOnScreen(Rect arg0, boolean arg1)
final void requestUnbufferedDispatch(int arg0)
final void requestUnbufferedDispatch(MotionEvent arg0)
final <T extends View> T requireViewById(int arg0)
void resetPivot()
static int resolveSize(int arg0, int arg1)
static int resolveSizeAndState(int arg0, int arg1, int arg2)
boolean restoreDefaultFocus()
void restoreHierarchyState(SparseArray<Parcelable> arg0)
final void saveAttributeDataForStyleable(Context arg0, int[] arg1, AttributeSet arg2, TypedArray arg3, int arg4, int arg5)
void saveHierarchyState(SparseArray<Parcelable> arg0)
void scheduleDrawable(Drawable arg0, Runnable arg1, long arg2)
void scrollBy(int arg0, int arg1)
void scrollTo(int arg0, int arg1)
void sendAccessibilityEvent(int arg0)
void sendAccessibilityEventUnchecked(AccessibilityEvent arg0)
void setAccessibilityDataSensitive(int arg0)
void setAccessibilityDelegate(View.AccessibilityDelegate arg0)
void setAccessibilityHeading(boolean arg0)
void setAccessibilityLiveRegion(int arg0)
void setAccessibilityPaneTitle(CharSequence arg0)
void setAccessibilityTraversalAfter(int arg0)
void setAccessibilityTraversalBefore(int arg0)
void setActivated(boolean arg0)
void setAllowClickWhenDisabled(boolean arg0)
void setAllowedHandwritingDelegatePackage(String arg0)
void setAllowedHandwritingDelegatorPackage(String arg0)
void setAlpha(float arg0)
void setAnimation(Animation arg0)
void setAnimationMatrix(Matrix arg0)
void setAutoHandwritingEnabled(boolean arg0)
void setAutofillHints(String... arg0)
void setAutofillId(AutofillId arg0)
void setBackground(Drawable arg0)
void setBackgroundColor(int arg0)
void setBackgroundDrawable(Drawable arg0)
void setBackgroundResource(int arg0)
void setBackgroundTintBlendMode(BlendMode arg0)
void setBackgroundTintList(ColorStateList arg0)
void setBackgroundTintMode(PorterDuff.Mode arg0)
final void setBottom(int arg0)
void setCameraDistance(float arg0)
void setClickable(boolean arg0)
void setClipBounds(Rect arg0)
void setClipToOutline(boolean arg0)
void setContentCaptureSession(ContentCaptureSession arg0)
void setContentDescription(CharSequence arg0)
void setContextClickable(boolean arg0)
void setDefaultFocusHighlightEnabled(boolean arg0)
void setDrawingCacheBackgroundColor(int arg0)
void setDrawingCacheEnabled(boolean arg0)
void setDrawingCacheQuality(int arg0)
void setDuplicateParentStateEnabled(boolean arg0)
void setElevation(float arg0)
void setEnabled(boolean arg0)
void setFadingEdgeLength(int arg0)
void setFilterTouchesWhenObscured(boolean arg0)
void setFitsSystemWindows(boolean arg0)
void setFocusable(boolean arg0)
void setFocusable(int arg0)
void setFocusableInTouchMode(boolean arg0)
void setFocusedByDefault(boolean arg0)
void setForceDarkAllowed(boolean arg0)
void setForeground(Drawable arg0)
void setForegroundGravity(int arg0)
void setForegroundTintBlendMode(BlendMode arg0)
void setForegroundTintList(ColorStateList arg0)
void setForegroundTintMode(PorterDuff.Mode arg0)
void setHandwritingBoundsOffsets(float arg0, float arg1, float arg2, float arg3)
void setHandwritingDelegatorCallback(Runnable arg0)
void setHapticFeedbackEnabled(boolean arg0)
void setHasTransientState(boolean arg0)
void setHorizontalFadingEdgeEnabled(boolean arg0)
void setHorizontalScrollBarEnabled(boolean arg0)
void setHorizontalScrollbarThumbDrawable(Drawable arg0)
void setHorizontalScrollbarTrackDrawable(Drawable arg0)
void setHovered(boolean arg0)
void setId(int arg0)
void setImportantForAccessibility(int arg0)
void setImportantForAutofill(int arg0)
void setImportantForContentCapture(int arg0)
void setIsCredential(boolean arg0)
void setIsHandwritingDelegate(boolean arg0)
void setKeepScreenOn(boolean arg0)
void setKeyboardNavigationCluster(boolean arg0)
void setLabelFor(int arg0)
void setLayerPaint(Paint arg0)
void setLayerType(int arg0, Paint arg1)
void setLayoutDirection(int arg0)
void setLayoutParams(ViewGroup.LayoutParams arg0)
final void setLeft(int arg0)
final void setLeftTopRightBottom(int arg0, int arg1, int arg2, int arg3)
void setLongClickable(boolean arg0)
final void setMeasuredDimension(int arg0, int arg1)
void setMinimumHeight(int arg0)
void setMinimumWidth(int arg0)
void setNestedScrollingEnabled(boolean arg0)
void setNextClusterForwardId(int arg0)
void setNextFocusDownId(int arg0)
void setNextFocusForwardId(int arg0)
void setNextFocusLeftId(int arg0)
void setNextFocusRightId(int arg0)
void setNextFocusUpId(int arg0)
void setOnApplyWindowInsetsListener(View.OnApplyWindowInsetsListener arg0)
void setOnCapturedPointerListener(View.OnCapturedPointerListener arg0)
void setOnClickListener(View.OnClickListener arg0)
void setOnContextClickListener(View.OnContextClickListener arg0)
void setOnCreateContextMenuListener(View.OnCreateContextMenuListener arg0)
void setOnDragListener(View.OnDragListener arg0)
void setOnFocusChangeListener(View.OnFocusChangeListener arg0)
void setOnGenericMotionListener(View.OnGenericMotionListener arg0)
void setOnHoverListener(View.OnHoverListener arg0)
void setOnKeyListener(View.OnKeyListener arg0)
void setOnLongClickListener(View.OnLongClickListener arg0)
void setOnReceiveContentListener(String[] arg0, OnReceiveContentListener arg1)
void setOnScrollChangeListener(View.OnScrollChangeListener arg0)
void setOnSystemUiVisibilityChangeListener(View.OnSystemUiVisibilityChangeListener arg0)
void setOnTouchListener(View.OnTouchListener arg0)
void setOutlineAmbientShadowColor(int arg0)
void setOutlineProvider(ViewOutlineProvider arg0)
void setOutlineSpotShadowColor(int arg0)
void setOverScrollMode(int arg0)
void setPadding(int arg0, int arg1, int arg2, int arg3)
void setPaddingRelative(int arg0, int arg1, int arg2, int arg3)
void setPivotX(float arg0)
void setPivotY(float arg0)
void setPointerIcon(PointerIcon arg0)
final void setPreferKeepClear(boolean arg0)
final void setPreferKeepClearRects(List<Rect> arg0)
void setPressed(boolean arg0)
void setRenderEffect(RenderEffect arg0)
final void setRevealOnFocusHint(boolean arg0)
final void setRight(int arg0)
void setRotation(float arg0)
void setRotationX(float arg0)
void setRotationY(float arg0)
void setSaveEnabled(boolean arg0)
void setSaveFromParentEnabled(boolean arg0)
void setScaleX(float arg0)
void setScaleY(float arg0)
void setScreenReaderFocusable(boolean arg0)
void setScrollBarDefaultDelayBeforeFade(int arg0)
void setScrollBarFadeDuration(int arg0)
void setScrollBarSize(int arg0)
void setScrollBarStyle(int arg0)
final void setScrollCaptureCallback(ScrollCaptureCallback arg0)
void setScrollCaptureHint(int arg0)
void setScrollContainer(boolean arg0)
void setScrollIndicators(int arg0, int arg1)
void setScrollIndicators(int arg0)
void setScrollX(int arg0)
void setScrollY(int arg0)
void setScrollbarFadingEnabled(boolean arg0)
void setSelected(boolean arg0)
void setSoundEffectsEnabled(boolean arg0)
void setStateDescription(CharSequence arg0)
void setStateListAnimator(StateListAnimator arg0)
void setSystemGestureExclusionRects(List<Rect> arg0)
void setSystemUiVisibility(int arg0)
void setTag(int arg0, Object arg1)
void setTag(Object arg0)
void setTextAlignment(int arg0)
void setTextDirection(int arg0)
void setTooltipText(CharSequence arg0)
final void setTop(int arg0)
void setTouchDelegate(TouchDelegate arg0)
void setTransitionAlpha(float arg0)
final void setTransitionName(String arg0)
void setTransitionVisibility(int arg0)
void setTranslationX(float arg0)
void setTranslationY(float arg0)
void setTranslationZ(float arg0)
void setVerticalFadingEdgeEnabled(boolean arg0)
void setVerticalScrollBarEnabled(boolean arg0)
void setVerticalScrollbarPosition(int arg0)
void setVerticalScrollbarThumbDrawable(Drawable arg0)
void setVerticalScrollbarTrackDrawable(Drawable arg0)
void setViewTranslationCallback(ViewTranslationCallback arg0)
void setVisibility(int arg0)
void setWillNotCacheDrawing(boolean arg0)
void setWillNotDraw(boolean arg0)
void setWindowInsetsAnimationCallback(WindowInsetsAnimation.Callback arg0)
void setX(float arg0)
void setY(float arg0)
void setZ(float arg0)
boolean showContextMenu()
boolean showContextMenu(float arg0, float arg1)
ActionMode startActionMode(ActionMode.Callback arg0, int arg1)
ActionMode startActionMode(ActionMode.Callback arg0)
void startAnimation(Animation arg0)
final boolean startDrag(ClipData arg0, View.DragShadowBuilder arg1, Object arg2, int arg3)
final boolean startDragAndDrop(ClipData arg0, View.DragShadowBuilder arg1, Object arg2, int arg3)
boolean startNestedScroll(int arg0)
void stopNestedScroll()
String toString()
void transformMatrixToGlobal(Matrix arg0)
void transformMatrixToLocal(Matrix arg0)
void unscheduleDrawable(Drawable arg0, Runnable arg1)
void unscheduleDrawable(Drawable arg0)
final void updateDragShadow(View.DragShadowBuilder arg0)
boolean verifyDrawable(Drawable arg0)
boolean willNotCacheDrawing()
boolean willNotDraw()
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()
abstract ColorStateList getSupportButtonTintList()
abstract PorterDuff.Mode getSupportButtonTintMode()
abstract void setSupportButtonTintList(ColorStateList arg0)
abstract void setSupportButtonTintMode(PorterDuff.Mode arg0)
abstract ColorStateList getSupportBackgroundTintList()
abstract PorterDuff.Mode getSupportBackgroundTintMode()
abstract void setSupportBackgroundTintList(ColorStateList arg0)
abstract void setSupportBackgroundTintMode(PorterDuff.Mode arg0)
abstract boolean isEmojiCompatEnabled()
abstract void setEmojiCompatEnabled(boolean arg0)
abstract ColorStateList getSupportCompoundDrawablesTintList()
abstract PorterDuff.Mode getSupportCompoundDrawablesTintMode()
abstract void setSupportCompoundDrawablesTintList(ColorStateList arg0)
abstract void setSupportCompoundDrawablesTintMode(PorterDuff.Mode arg0)
abstract boolean isChecked()
abstract void setChecked(boolean arg0)
abstract void toggle()
abstract boolean onPreDraw()
abstract void invalidateDrawable(Drawable arg0)
abstract void scheduleDrawable(Drawable arg0, Runnable arg1, long arg2)
abstract void unscheduleDrawable(Drawable arg0, Runnable arg1)
abstract boolean onKeyDown(int arg0, KeyEvent arg1)
abstract boolean onKeyLongPress(int arg0, KeyEvent arg1)
abstract boolean onKeyMultiple(int arg0, int arg1, KeyEvent arg2)
abstract boolean onKeyUp(int arg0, KeyEvent arg1)
abstract void sendAccessibilityEvent(int arg0)
abstract void sendAccessibilityEventUnchecked(AccessibilityEvent arg0)
abstract void onChipDrawableSizeChange()

Handles a change in the ChipDrawable's size.

abstract ShapeAppearanceModel getShapeAppearanceModel()

Returns the ShapeAppearanceModel used for the shape definition.

abstract void setShapeAppearanceModel(ShapeAppearanceModel shapeAppearanceModel)

Sets the ShapeAppearanceModel that defines the shape.

XML attributes

Chip_android_checkable

Related methods:

Chip_android_textAppearance

Related methods:

Chip_checkedIcon

Related methods:

Chip_checkedIconTint

Related methods:

Chip_checkedIconVisible

Related methods:

Chip_chipBackgroundColor

Related methods:

Chip_chipCornerRadius

Related methods:

Chip_chipEndPadding

Related methods:

Chip_chipIcon

Related methods:

Chip_chipIconSize

Related methods:

Chip_chipIconTint

Related methods:

Chip_chipIconVisible

Related methods:

Chip_chipMinHeight

Related methods:

Chip_chipStartPadding

Related methods:

Chip_chipStrokeColor

Related methods:

Chip_chipStrokeWidth

Related methods:

Chip_closeIcon

Related methods:

Chip_closeIconEndPadding

Related methods:

Chip_closeIconSize

Related methods:

Chip_closeIconStartPadding

Related methods:

Chip_closeIconTint

Related methods:

Chip_closeIconVisible

Related methods:

Chip_ensureMinTouchTargetSize

Related methods:

Chip_hideMotionSpec

Related methods:

Chip_iconEndPadding

Related methods:

Chip_iconStartPadding

Related methods:

Chip_rippleColor

Related methods:

Chip_showMotionSpec

Related methods:

Chip_textEndPadding

Related methods:

Chip_textStartPadding

Related methods:

Public constructors

Chip

public Chip (Context context)

Parameters
context Context

Chip

public Chip (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

Chip

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

Parameters
context Context

attrs AttributeSet

defStyleAttr int

Public methods

dispatchKeyEvent

public boolean dispatchKeyEvent (KeyEvent event)

Parameters
event KeyEvent

Returns
boolean

ensureAccessibleTouchTarget

public boolean ensureAccessibleTouchTarget (int minTargetPx)

Extends the touch target of this chip using a InsetDrawable if chip's intrinsic width / height is smaller than the minTargetPx.

Parameters
minTargetPx int: minimum touch target size in pixel

Returns
boolean whether the background was changed

getAccessibilityClassName

public CharSequence getAccessibilityClassName ()

Returns
CharSequence

getBackgroundDrawable

public Drawable getBackgroundDrawable ()

Returns
Drawable

getCheckedIcon

public Drawable getCheckedIcon ()

Returns this chip's checked icon.

Related XML Attributes:

Returns
Drawable

getCheckedIconTint

public ColorStateList getCheckedIconTint ()

Returns the ColorStateList used to tint the checked icon.

Related XML Attributes:

Returns
ColorStateList

getChipBackgroundColor

public ColorStateList getChipBackgroundColor ()

Returns this chip's background color.

Related XML Attributes:

Returns
ColorStateList

getChipCornerRadius

public float getChipCornerRadius ()

Returns this chip's corner radius.

Related XML Attributes:

Returns
float

getChipDrawable

public Drawable getChipDrawable ()

Returns the ChipDrawable backing this chip.

Returns
Drawable

getChipEndPadding

public float getChipEndPadding ()

Returns this chip's end padding.

Related XML Attributes:

Returns
float

getChipIcon

public Drawable getChipIcon ()

Returns this chip's icon.

Related XML Attributes:

Returns
Drawable

getChipIconSize

public float getChipIconSize ()

Returns this chip's icon size. If a non-positive value is set, the icon drawable's width and height (up to 24dp) will be used instead.

Related XML Attributes:

Returns
float

getChipIconTint

public ColorStateList getChipIconTint ()

Returns the ColorStateList used to tint the chip icon.

Related XML Attributes:

Returns
ColorStateList

getChipMinHeight

public float getChipMinHeight ()

Returns this chip's minimum height.

Related XML Attributes:

Returns
float

getChipStartPadding

public float getChipStartPadding ()

Returns this chip's start padding.

Related XML Attributes:

Returns
float

getChipStrokeColor

public ColorStateList getChipStrokeColor ()

Returns this chip's stroke color.

Related XML Attributes:

Returns
ColorStateList

getChipStrokeWidth

public float getChipStrokeWidth ()

Returns this chip's stroke width.

Related XML Attributes:

Returns
float

getChipText

public CharSequence getChipText ()

This method is deprecated.
Use TextView.getText() instead.

Returns this chip's text.

Returns
CharSequence

getCloseIcon

public Drawable getCloseIcon ()

Returns this chip's close icon.

Related XML Attributes:

Returns
Drawable

getCloseIconContentDescription

public CharSequence getCloseIconContentDescription ()

Returns this chip's close icon content description.

Returns
CharSequence

getCloseIconEndPadding

public float getCloseIconEndPadding ()

Returns the end padding for this chip's close icon.

Related XML Attributes:

Returns
float

getCloseIconSize

public float getCloseIconSize ()

Returns this chip's close icon size.

Related XML Attributes:

Returns
float

getCloseIconStartPadding

public float getCloseIconStartPadding ()

Returns the start padding for this chip's close icon.

Related XML Attributes:

Returns
float

getCloseIconTint

public ColorStateList getCloseIconTint ()

Returns the tint color for this chip's close icon.

Related XML Attributes:

Returns
ColorStateList

getEllipsize

public TextUtils.TruncateAt getEllipsize ()

Returns
TextUtils.TruncateAt

getFocusedRect

public void getFocusedRect (Rect r)

Parameters
r Rect

getHideMotionSpec

public MotionSpec getHideMotionSpec ()

Returns this chip's hide motion spec.

Related XML Attributes:

Returns
MotionSpec

getIconEndPadding

public float getIconEndPadding ()

Returns the end padding for this chip's icon.

Related XML Attributes:

Returns
float

getIconStartPadding

public float getIconStartPadding ()

Returns the start padding for this chip's icon.

Related XML Attributes:

Returns
float

getRippleColor

public ColorStateList getRippleColor ()

Returns this chip's ripple color.

Related XML Attributes:

Returns
ColorStateList

getShapeAppearanceModel

public ShapeAppearanceModel getShapeAppearanceModel ()

Returns the ShapeAppearanceModel used for the shape definition.

This ShapeAppearanceModel can be modified to change the shape.

getShowMotionSpec

public MotionSpec getShowMotionSpec ()

Returns this chip's show motion spec.

Related XML Attributes:

Returns
MotionSpec

getTextEndPadding

public float getTextEndPadding ()

Returns the end padding for this chip's text.

Related XML Attributes:

Returns
float

getTextStartPadding

public float getTextStartPadding ()

Returns the start padding for this chip's text.

Related XML Attributes:

Returns
float

isCheckable

public boolean isCheckable ()

Returns whether this chip is checkable.

Related XML Attributes:

Returns
boolean

isCheckedIconEnabled

public boolean isCheckedIconEnabled ()

This method is deprecated.
Use isCheckedIconVisible() instead.

Returns
boolean

isCheckedIconVisible

public boolean isCheckedIconVisible ()

Returns whether this chip's checked icon is visible.

Related XML Attributes:

Returns
boolean

isChipIconEnabled

public boolean isChipIconEnabled ()

This method is deprecated.
Use isChipIconVisible() instead.

Returns
boolean

isChipIconVisible

public boolean isChipIconVisible ()

Returns whether this chip's icon is visible.

Related XML Attributes:

Returns
boolean

isCloseIconEnabled

public boolean isCloseIconEnabled ()

This method is deprecated.
Use isCloseIconVisible() instead.

Returns
boolean

isCloseIconVisible

public boolean isCloseIconVisible ()

Returns whether this chip's close icon is visible.

Related XML Attributes:

Returns
boolean

onChipDrawableSizeChange

public void onChipDrawableSizeChange ()

Handles a change in the ChipDrawable's size.

onHoverEvent

public boolean onHoverEvent (MotionEvent event)

Parameters
event MotionEvent

Returns
boolean

onInitializeAccessibilityNodeInfo

public void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info)

Parameters
info AccessibilityNodeInfo

onResolvePointerIcon

public PointerIcon onResolvePointerIcon (MotionEvent event, 
                int pointerIndex)

Parameters
event MotionEvent

pointerIndex int

Returns
PointerIcon

onRtlPropertiesChanged

public void onRtlPropertiesChanged (int layoutDirection)

Parameters
layoutDirection int

onTouchEvent

public boolean onTouchEvent (MotionEvent event)

Parameters
event MotionEvent

Returns
boolean

performCloseIconClick

public boolean performCloseIconClick ()

Call this chip's close icon click listener, 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 close icon click listener that was called, false otherwise is returned.

setAccessibilityClassName

public void setAccessibilityClassName (CharSequence className)

Sets this chip's accessibility class name.

Parameters
className CharSequence: This chip's accessibility class name.

setBackground

public void setBackground (Drawable background)

Parameters
background Drawable

setBackgroundColor

public void setBackgroundColor (int color)

Parameters
color int

setBackgroundDrawable

public void setBackgroundDrawable (Drawable background)

Parameters
background Drawable

setBackgroundResource

public void setBackgroundResource (int resid)

Parameters
resid int

setBackgroundTintList

public void setBackgroundTintList (ColorStateList tint)

Parameters
tint ColorStateList

setBackgroundTintMode

public void setBackgroundTintMode (PorterDuff.Mode tintMode)

Parameters
tintMode PorterDuff.Mode

setCheckable

public void setCheckable (boolean checkable)

Sets whether this chip is checkable.

Related XML Attributes:

Parameters
checkable boolean: Whether this chip is checkable.

setCheckableResource

public void setCheckableResource (int id)

Sets whether this chip is checkable using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip is checkable.

setChecked

public void setChecked (boolean checked)

Parameters
checked boolean

setCheckedIcon

public void setCheckedIcon (Drawable checkedIcon)

Sets this chip's checked icon.

Related XML Attributes:

Parameters
checkedIcon Drawable: This chip's checked icon.

setCheckedIconEnabled

public void setCheckedIconEnabled (boolean checkedIconEnabled)

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

Parameters
checkedIconEnabled boolean

setCheckedIconEnabledResource

public void setCheckedIconEnabledResource (int id)

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

Parameters
id int

setCheckedIconResource

public void setCheckedIconResource (int id)

Sets this chip's checked icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's checked icon.

setCheckedIconTint

public void setCheckedIconTint (ColorStateList checkedIconTint)

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

Related XML Attributes:

Parameters
checkedIconTint ColorStateList: The tint color of this chip's checked icon.

setCheckedIconTintResource

public void setCheckedIconTintResource (int id)

Sets this chip's checked icon's color tint using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for tinting the checked icon.

setCheckedIconVisible

public void setCheckedIconVisible (int id)

Sets whether this chip's checked icon is visible using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's check icon visibility.

setCheckedIconVisible

public void setCheckedIconVisible (boolean checkedIconVisible)

Sets whether this chip's checked icon is visible.

Related XML Attributes:

Parameters
checkedIconVisible boolean: This chip's checked icon visibility.

setChipBackgroundColor

public void setChipBackgroundColor (ColorStateList chipBackgroundColor)

Sets this chip's background color.

Related XML Attributes:

Parameters
chipBackgroundColor ColorStateList: This chip's background color.

setChipBackgroundColorResource

public void setChipBackgroundColorResource (int id)

Sets this chip's background color using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's background color.

setChipCornerRadius

public void setChipCornerRadius (float chipCornerRadius)

This method is deprecated.
call ShapeAppearanceModel.withCornerSize(float) or call ShapeAppearanceModel.toBuilder() on the getShapeAppearanceModel(), modify the shape using the builder and then call setShapeAppearanceModel(ShapeAppearanceModel).

Parameters
chipCornerRadius float

setChipCornerRadiusResource

public void setChipCornerRadiusResource (int id)

This method is deprecated.
call ShapeAppearanceModel.withCornerSize(float) or call ShapeAppearanceModel.toBuilder() on the getShapeAppearanceModel(), modify the shape using the builder and then call setShapeAppearanceModel(ShapeAppearanceModel).

Parameters
id int

setChipDrawable

public void setChipDrawable (ChipDrawable drawable)

Sets the ChipDrawable backing this chip.

Parameters
drawable ChipDrawable

setChipEndPadding

public void setChipEndPadding (float chipEndPadding)

Sets this chip's end padding.

Related XML Attributes:

Parameters
chipEndPadding float: This chip's end padding.

setChipEndPaddingResource

public void setChipEndPaddingResource (int id)

Sets this chip's end padding using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for this chip's end padding.

setChipIcon

public void setChipIcon (Drawable chipIcon)

Sets this chip's icon.

Related XML Attributes:

Parameters
chipIcon Drawable: drawable of this chip's icon.

setChipIconEnabled

public void setChipIconEnabled (boolean chipIconEnabled)

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

Parameters
chipIconEnabled boolean

setChipIconEnabledResource

public void setChipIconEnabledResource (int id)

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

Parameters
id int

setChipIconResource

public void setChipIconResource (int id)

Sets this chip's icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for this chip's icon.

setChipIconSize

public void setChipIconSize (float chipIconSize)

Sets this chip icon's size. If the value is zero or negative, the icon drawable's width and height (up to 24dp) will be used instead.

Related XML Attributes:

Parameters
chipIconSize float: This chip's icon size.

setChipIconSizeResource

public void setChipIconSizeResource (int id)

Sets this chip icon's size using a resource id. If the value is zero or negative, the icon drawable's width and height (up to 24dp) will be used instead.

Related XML Attributes:

Parameters
id int: The resource id of this chip's icon size.

setChipIconTint

public void setChipIconTint (ColorStateList chipIconTint)

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

Related XML Attributes:

Parameters
chipIconTint ColorStateList: The tint color of this chip's icon.

setChipIconTintResource

public void setChipIconTintResource (int id)

Sets this chip icon's color tint using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for tinting the chip icon.

setChipIconVisible

public void setChipIconVisible (int id)

Sets the visibility of this chip's icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the visibility of this chip's icon.

setChipIconVisible

public void setChipIconVisible (boolean chipIconVisible)

Sets whether this chip's icon is visible.

Parameters
chipIconVisible boolean: The visibility of this chip's icon.

setChipMinHeight

public void setChipMinHeight (float minHeight)

Sets this chip's minimum height.

Related XML Attributes:

Parameters
minHeight float: This chip's minimum height.

setChipMinHeightResource

public void setChipMinHeightResource (int id)

Sets this chip's minimum height using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's minimum height.

setChipStartPadding

public void setChipStartPadding (float chipStartPadding)

Sets this chip's start padding.

Related XML Attributes:

Parameters
chipStartPadding float: This chip's start padding.

setChipStartPaddingResource

public void setChipStartPaddingResource (int id)

Sets this chip's start padding using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's start padding.

setChipStrokeColor

public void setChipStrokeColor (ColorStateList chipStrokeColor)

Sets this chip's stroke color.

Related XML Attributes:

Parameters
chipStrokeColor ColorStateList: This chip's stroke color.

setChipStrokeColorResource

public void setChipStrokeColorResource (int id)

Sets this chip's stroke color using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's stroke color.

setChipStrokeWidth

public void setChipStrokeWidth (float chipStrokeWidth)

Sets this chip's stroke width.

Related XML Attributes:

Parameters
chipStrokeWidth float: This chip's stroke width.

setChipStrokeWidthResource

public void setChipStrokeWidthResource (int id)

Sets this chip's stroke width using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's stroke width.

setChipText

public void setChipText (CharSequence chipText)

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

Parameters
chipText CharSequence

setChipTextResource

public void setChipTextResource (int id)

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

Parameters
id int

setCloseIcon

public void setCloseIcon (Drawable closeIcon)

Sets this chip's close icon.

Related XML Attributes:

Parameters
closeIcon Drawable: This chip's close icon.

setCloseIconContentDescription

public void setCloseIconContentDescription (CharSequence closeIconContentDescription)

Sets the content description for this chip's close icon.

Parameters
closeIconContentDescription CharSequence: The content description for this chip's close icon.

setCloseIconEnabled

public void setCloseIconEnabled (boolean closeIconEnabled)

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

Parameters
closeIconEnabled boolean

setCloseIconEnabledResource

public void setCloseIconEnabledResource (int id)

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

Parameters
id int

setCloseIconEndPadding

public void setCloseIconEndPadding (float closeIconEndPadding)

Sets the end padding for this chip's close icon.

Related XML Attributes:

Parameters
closeIconEndPadding float: The end padding of this chip's close icon.

setCloseIconEndPaddingResource

public void setCloseIconEndPaddingResource (int id)

Sets the end padding for this chip's close icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the end padding of this chip's close icon.

setCloseIconResource

public void setCloseIconResource (int id)

Sets this chip's close icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's close icon.

setCloseIconSize

public void setCloseIconSize (float closeIconSize)

Sets this chip's close icon size.

Related XML Attributes:

Parameters
closeIconSize float: This chip's close icon size.

setCloseIconSizeResource

public void setCloseIconSizeResource (int id)

Sets this chip's close icon size using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's close icon size.

setCloseIconStartPadding

public void setCloseIconStartPadding (float closeIconStartPadding)

Sets the start padding for this chip's close icon.

Related XML Attributes:

Parameters
closeIconStartPadding float: The start padding of this chip's close icon.

setCloseIconStartPaddingResource

public void setCloseIconStartPaddingResource (int id)

Sets the start padding for this chip's close icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the start padding of this chip's close icon.

setCloseIconTint

public void setCloseIconTint (ColorStateList closeIconTint)

Sets the tint color for this chip's close icon.

Related XML Attributes:

Parameters
closeIconTint ColorStateList: This chip's close icon tint.

setCloseIconTintResource

public void setCloseIconTintResource (int id)

Sets the tint color for this chip's close icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's close icon tint.

setCloseIconVisible

public void setCloseIconVisible (boolean closeIconVisible)

Sets whether this chip close icon is visible.

Related XML Attributes:

Parameters
closeIconVisible boolean: This chip's close icon visibility.

setCloseIconVisible

public void setCloseIconVisible (int id)

Sets whether this chip close icon is visible using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's close icon visibility.

setCompoundDrawables

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

Parameters
left Drawable

top Drawable

right Drawable

bottom Drawable

setCompoundDrawablesRelative

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

Parameters
start Drawable

top Drawable

end Drawable

bottom Drawable

setCompoundDrawablesRelativeWithIntrinsicBounds

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

Parameters
start Drawable

top Drawable

end Drawable

bottom Drawable

setCompoundDrawablesRelativeWithIntrinsicBounds

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

Parameters
start int

top int

end int

bottom int

setCompoundDrawablesWithIntrinsicBounds

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

Parameters
left int

top int

right int

bottom int

setCompoundDrawablesWithIntrinsicBounds

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

Parameters
left Drawable

top Drawable

right Drawable

bottom Drawable

setElevation

public void setElevation (float elevation)

Parameters
elevation float

setEllipsize

public void setEllipsize (TextUtils.TruncateAt where)

Parameters
where TextUtils.TruncateAt

setEnsureMinTouchTargetSize

public void setEnsureMinTouchTargetSize (boolean flag)

Sets whether this chip should expand its bounds (if needed) to meet the minimum touch target size.

Related XML Attributes:

Parameters
flag boolean: Whether this chip should meet the min touch target size.

setGravity

public void setGravity (int gravity)

Parameters
gravity int

setHideMotionSpec

public void setHideMotionSpec (MotionSpec hideMotionSpec)

Sets this chip's hide motion spec.

Related XML Attributes:

Parameters
hideMotionSpec MotionSpec: This chip's hide motion spec.

setHideMotionSpecResource

public void setHideMotionSpecResource (int id)

Sets this chip's hide motion spec using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's hide motion spec.

setIconEndPadding

public void setIconEndPadding (float iconEndPadding)

Sets the end padding for this chip's icon.

Related XML Attributes:

Parameters
iconEndPadding float: The end padding of this chip's icon.

setIconEndPaddingResource

public void setIconEndPaddingResource (int id)

Sets the end padding for this chip's icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the end padding of this chip's icon.

setIconStartPadding

public void setIconStartPadding (float iconStartPadding)

Sets this chip's icon start padding.

Related XML Attributes:

Parameters
iconStartPadding float: The start padding of this chip's icon.

setIconStartPaddingResource

public void setIconStartPaddingResource (int id)

Sets the start padding for this chip's icon using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the start padding of this chip's icon.

setLayoutDirection

public void setLayoutDirection (int layoutDirection)

Parameters
layoutDirection int

setLines

public void setLines (int lines)

Parameters
lines int

setMaxLines

public void setMaxLines (int maxLines)

Parameters
maxLines int

setMaxWidth

public void setMaxWidth (int maxWidth)

Parameters
maxWidth int

setMinLines

public void setMinLines (int minLines)

Parameters
minLines int

setOnCheckedChangeListener

public void setOnCheckedChangeListener (CompoundButton.OnCheckedChangeListener listener)

Parameters
listener CompoundButton.OnCheckedChangeListener

setOnCloseIconClickListener

public void setOnCloseIconClickListener (View.OnClickListener listener)

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

Parameters
listener View.OnClickListener

setRippleColor

public void setRippleColor (ColorStateList rippleColor)

Sets this chip's ripple color.

Related XML Attributes:

Parameters
rippleColor ColorStateList: This chip's ripple color.

setRippleColorResource

public void setRippleColorResource (int id)

Sets this chip's ripple color using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's ripple color.

setShapeAppearanceModel

public void setShapeAppearanceModel (ShapeAppearanceModel shapeAppearanceModel)

Sets the ShapeAppearanceModel that defines the shape.

Parameters
shapeAppearanceModel ShapeAppearanceModel

setShowMotionSpec

public void setShowMotionSpec (MotionSpec showMotionSpec)

Sets this chip's show motion spec.

Related XML Attributes:

Parameters
showMotionSpec MotionSpec: This chip's show motion spec.

setShowMotionSpecResource

public void setShowMotionSpecResource (int id)

Sets this chip's show motion spec using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's show motion spec.

setSingleLine

public void setSingleLine (boolean singleLine)

Parameters
singleLine boolean

setText

public void setText (CharSequence text, 
                TextView.BufferType type)

Parameters
text CharSequence

type TextView.BufferType

setTextAppearance

public void setTextAppearance (TextAppearance textAppearance)

Sets this chip's text appearance.

Related XML Attributes:

Parameters
textAppearance TextAppearance: This chip's text appearance.

setTextAppearance

public void setTextAppearance (int resId)

Parameters
resId int

setTextAppearance

public void setTextAppearance (Context context, 
                int resId)

Parameters
context Context

resId int

setTextAppearanceResource

public void setTextAppearanceResource (int id)

Sets this chip's text appearance using a resource id.

Related XML Attributes:

Parameters
id int: The resource id of this chip's text appearance.

setTextEndPadding

public void setTextEndPadding (float textEndPadding)

Sets the end padding for this chip's text.

Related XML Attributes:

Parameters
textEndPadding float: The end padding of this chip's text.

setTextEndPaddingResource

public void setTextEndPaddingResource (int id)

Sets the end padding for this chip's text using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the end padding of this chip's text.

setTextSize

public void setTextSize (int unit, 
                float size)

Parameters
unit int

size float

setTextStartPadding

public void setTextStartPadding (float textStartPadding)

Sets the start padding for this chip's text.

Related XML Attributes:

Parameters
textStartPadding float: The start padding of this chip's text.

setTextStartPaddingResource

public void setTextStartPaddingResource (int id)

Sets the start padding for this chip's text using a resource id.

Related XML Attributes:

Parameters
id int: The resource id for the start padding of this chip's text.

shouldEnsureMinTouchTargetSize

public boolean shouldEnsureMinTouchTargetSize ()

Returns whether this chip will expand its bounds (if needed) to meet the minimum touch target size.

Related XML Attributes:

Returns
boolean

Protected methods

dispatchHoverEvent

protected boolean dispatchHoverEvent (MotionEvent event)

Parameters
event MotionEvent

Returns
boolean

drawableStateChanged

protected void drawableStateChanged ()

onAttachedToWindow

protected void onAttachedToWindow ()

onCreateDrawableState

protected int[] onCreateDrawableState (int extraSpace)

Parameters
extraSpace int

Returns
int[]

onFocusChanged

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

Parameters
focused boolean

direction int

previouslyFocusedRect Rect