Source/sources/android/support/p003v7/widget/SwitchCompat.java
public void onLayout(boolean changed, int left, int top, int right, int bottom) {
        int switchRight;
        int switchLeft;
        int switchBottom;
        int switchTop;
        super.onLayout(changed, left, top, right, bottom);
        int opticalInsetLeft = 0;
        int opticalInsetRight = 0;
        if (this.mThumbDrawable != null) {
            Rect trackPadding = this.mTempRect;
            if (this.mTrackDrawable != null) {
                this.mTrackDrawable.getPadding(trackPadding);
            } else {
                trackPadding.setEmpty();
            }
            Rect insets = DrawableUtils.getOpticalBounds(this.mThumbDrawable);
            opticalInsetLeft = Math.max(0, insets.left - trackPadding.left);
            opticalInsetRight = Math.max(0, insets.right - trackPadding.right);
        }
        if (ViewUtils.isLayoutRtl(this)) {
            switchLeft = getPaddingLeft() + opticalInsetLeft;
            switchRight = ((this.mSwitchWidth + switchLeft) - opticalInsetLeft) - opticalInsetRight;
        } else {
            switchRight = (getWidth() - getPaddingRight()) - opticalInsetRight;
            switchLeft = (switchRight - this.mSwitchWidth) + opticalInsetLeft + opticalInsetRight;
        }
        switch (getGravity() & 112) {
            case 16:
                switchTop = (((getPaddingTop() + getHeight()) - getPaddingBottom()) / 2) - (this.mSwitchHeight / 2);
                switchBottom = switchTop + this.mSwitchHeight;
                break;
            case 80:
                switchBottom = getHeight() - getPaddingBottom();
                switchTop = switchBottom - this.mSwitchHeight;
                break;
            default:
                switchTop = getPaddingTop();
                switchBottom = switchTop + this.mSwitchHeight;
                break;
        }
        this.mSwitchLeft = switchLeft;
        this.mSwitchTop = switchTop;
        this.mSwitchBottom = switchBottom;
        this.mSwitchRight = switchRight;
    }
/* access modifiers changed from: protected */
access modifiers changed from: protected
access modifiers changed from : protected
public void onLayout(boolean changed, int left, int top, int right, int bottom) {
        int switchRight;
        int switchLeft;
        int switchBottom;
        int switchTop;
        super.onLayout(changed, left, top, right, bottom);
        int opticalInsetLeft = 0;
        int opticalInsetRight = 0;
        if (this.mThumbDrawable != null) {
            Rect trackPadding = this.mTempRect;
            if (this.mTrackDrawable != null) {
                this.mTrackDrawable.getPadding(trackPadding);
            } else {
                trackPadding.setEmpty();
            }
            Rect insets = DrawableUtils.getOpticalBounds(this.mThumbDrawable);
            opticalInsetLeft = Math.max(0, insets.left - trackPadding.left);
            opticalInsetRight = Math.max(0, insets.right - trackPadding.right);
        }
        if (ViewUtils.isLayoutRtl(this)) {
            switchLeft = getPaddingLeft() + opticalInsetLeft;
            switchRight = ((this.mSwitchWidth + switchLeft) - opticalInsetLeft) - opticalInsetRight;
        } else {
            switchRight = (getWidth() - getPaddingRight()) - opticalInsetRight;
            switchLeft = (switchRight - this.mSwitchWidth) + opticalInsetLeft + opticalInsetRight;
        }
        switch (getGravity() & 112) {
            case 16:
                switchTop = (((getPaddingTop() + getHeight()) - getPaddingBottom()) / 2) - (this.mSwitchHeight / 2);
                switchBottom = switchTop + this.mSwitchHeight;
                break;
            case 80:
                switchBottom = getHeight() - getPaddingBottom();
                switchTop = switchBottom - this.mSwitchHeight;
                break;
            default:
                switchTop = getPaddingTop();
                switchBottom = switchTop + this.mSwitchHeight;
                break;
        }
        this.mSwitchLeft = switchLeft;
        this.mSwitchTop = switchTop;
        this.mSwitchBottom = switchBottom;
        this.mSwitchRight = switchRight;
    }
public void onLayout ( boolean changed , int left , int top , int right , int bottom ) { int switchRight ; int switchLeft ; int switchBottom ; int switchTop ; super . onLayout ( changed , left , top , right , bottom ) ; int opticalInsetLeft = 0 ; int opticalInsetRight = 0 ; if ( this . mThumbDrawable != null ) { Rect trackPadding = this . mTempRect ; if ( this . mTrackDrawable != null ) { this . mTrackDrawable . getPadding ( trackPadding ) ; } else { trackPadding . setEmpty ( ) ; } Rect insets = DrawableUtils . getOpticalBounds ( this . mThumbDrawable ) ; opticalInsetLeft = Math . max ( 0 , insets . left - trackPadding . left ) ; opticalInsetRight = Math . max ( 0 , insets . right - trackPadding . right ) ; } if ( ViewUtils . isLayoutRtl ( this ) ) { switchLeft = getPaddingLeft ( ) + opticalInsetLeft ; switchRight = ( ( this . mSwitchWidth + switchLeft ) - opticalInsetLeft ) - opticalInsetRight ; } else { switchRight = ( getWidth ( ) - getPaddingRight ( ) ) - opticalInsetRight ; switchLeft = ( switchRight - this . mSwitchWidth ) + opticalInsetLeft + opticalInsetRight ; } switch ( getGravity ( ) & 112 ) { case 16 : switchTop = ( ( ( getPaddingTop ( ) + getHeight ( ) ) - getPaddingBottom ( ) ) / 2 ) - ( this . mSwitchHeight / 2 ) ; switchBottom = switchTop + this . mSwitchHeight ; break ; case 80 : switchBottom = getHeight ( ) - getPaddingBottom ( ) ; switchTop = switchBottom - this . mSwitchHeight ; break ; default : switchTop = getPaddingTop ( ) ; switchBottom = switchTop + this . mSwitchHeight ; break ; } this . mSwitchLeft = switchLeft ; this . mSwitchTop = switchTop ; this . mSwitchBottom = switchBottom ; this . mSwitchRight = switchRight ; }
access modifiers changed from: protected
access modifiers changed from : protected