Code example for Drawable

Methods: getChangingConfigurations

0
    public int getChangingConfigurations() { 
        //@formatter:off 
        return super.getChangingConfigurations() 
                | mLeftCapDrawable.getChangingConfigurations()
                | mBottomAnchorDrawable.getChangingConfigurations()
                | mRightCapDrawable.getChangingConfigurations();
        //@formatter:on 
    } 
 
    private void updateBounds() { 
 
        // The anchor offset may be out of range. Let's clamp it to the 
        // authorized set of values. 
        final int anchorOffset;
        switch (mAnchorOffset) {
            case ANCHOR_POSITION_CENTER:
                anchorOffset = getBounds().width() / 2;
                break; 
 
            default: 
                anchorOffset = Math.min(Math.max(mLeftMargin, mAnchorOffset), getBounds().width() - mRightMargin);