CompoundButton

Class of android.widget · CompoundButton.java · Android's reference

public abstract class CompoundButton extends Button implements Checkable

CompoundButton ← Button ← TextView ← View

A button with a checked state, which a click toggles, and a button drawable at its left.

Nested types

Extended in the framework by

Constructors

public CompoundButton(Context context) source
public CompoundButton(Context context, AttributeSet attrs) source
public CompoundButton(Context context, AttributeSet attrs, int defStyleAttr) source
public CompoundButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) source

Methods

public void toggle() source
public boolean performClick() source
public boolean isChecked() source
public void setChecked(boolean checked) source
public void setOnCheckedChangeListener(OnCheckedChangeListener listener) source
public void setButtonDrawable(int resId) source
public void setButtonDrawable(Drawable drawable) source
public Drawable getButtonDrawable() source
public void setButtonTintList(ColorStateList tint) source
public ColorStateList getButtonTintList() source
public void setButtonTintMode(PorterDuff.Mode tintMode) source
public PorterDuff.Mode getButtonTintMode() source
public int getCompoundPaddingLeft() source
protected int[] onCreateDrawableState(int extraSpace) source
protected void drawableStateChanged() source
public void drawableHotspotChanged(float x, float y) source
protected boolean verifyDrawable(Drawable who) source
public void jumpDrawablesToCurrentState() source
protected void onDraw(Canvas canvas) source
public CharSequence getAccessibilityClassName() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.