FileDocCategorySizeDatePackage
TintButton.javaAPI DocAndroid 5.1 API1844Thu Mar 12 22:22:56 GMT 2015android.support.v7.internal.widget

TintButton

public class TintButton extends android.widget.Button
An tint aware {@link android.widget.Button}
hide

Fields Summary
private static final int[]
TINT_ATTRS
private final TintManager
mTintManager
Constructors Summary
public TintButton(android.content.Context context)


       
        this(context, null);
    
public TintButton(android.content.Context context, android.util.AttributeSet attrs)

        this(context, attrs, android.R.attr.buttonStyle);
    
public TintButton(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)

        super(context, attrs, defStyleAttr);

        TintTypedArray a = TintTypedArray.obtainStyledAttributes(context, attrs, TINT_ATTRS,
                defStyleAttr, 0);
        if (a.hasValue(0)) {
            setBackgroundDrawable(a.getDrawable(0));
        }

        // Keep the TintManager in case we need it later
        mTintManager = a.getTintManager();
    
Methods Summary
public voidsetBackgroundResource(int resid)

        setBackgroundDrawable(mTintManager.getDrawable(resid));