Code example for Drawable

Methods: isStatefulsetState

0
    protected void drawableStateChanged() { 
        super.drawableStateChanged(); 
        if (mBackground != null && mBackground.isStateful()) {
            mBackground.setState(getDrawableState());
        } 
        if (mStackedBackground != null && mStackedBackground.isStateful()) {
            mStackedBackground.setState(getDrawableState());
        } 
        if (mSplitBackground != null && mSplitBackground.isStateful()) {
            mSplitBackground.setState(getDrawableState());
        } 
    } 
 
    @Override 
    public void jumpDrawablesToCurrentState() { 
        super.jumpDrawablesToCurrentState(); 
        if (mBackground != null) {
            mBackground.jumpToCurrentState();
        } 
        if (mStackedBackground != null) {
            mStackedBackground.jumpToCurrentState();