Source/sources/android/support/p000v4/widget/DrawerLayout.java
public void onLayout(boolean changed, int l, int t, int r, int b) {
        int childLeft;
        float newOffset;
        this.mInLayout = true;
        int width = r - l;
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            View child = getChildAt(i);
            if (child.getVisibility() != 8) {
                LayoutParams lp = (LayoutParams) child.getLayoutParams();
                if (isContentView(child)) {
                    child.layout(lp.leftMargin, lp.topMargin, lp.leftMargin + child.getMeasuredWidth(), lp.topMargin + child.getMeasuredHeight());
                } else {
                    int childWidth = child.getMeasuredWidth();
                    int childHeight = child.getMeasuredHeight();
                    if (checkDrawerViewAbsoluteGravity(child, 3)) {
                        childLeft = (-childWidth) + ((int) (((float) childWidth) * lp.onScreen));
                        newOffset = ((float) (childWidth + childLeft)) / ((float) childWidth);
                    } else {
                        childLeft = width - ((int) (((float) childWidth) * lp.onScreen));
                        newOffset = ((float) (width - childLeft)) / ((float) childWidth);
                    }
                    boolean changeOffset = newOffset != lp.onScreen;
                    switch (lp.gravity & 112) {
                        case 16:
                            int height = b - t;
                            int childTop = (height - childHeight) / 2;
                            if (childTop < lp.topMargin) {
                                childTop = lp.topMargin;
                            } else {
                                if (childTop + childHeight > height - lp.bottomMargin) {
                                    childTop = (height - lp.bottomMargin) - childHeight;
                                }
                            }
                            child.layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
                            break;
                        case 80:
                            int height2 = b - t;
                            child.layout(childLeft, (height2 - lp.bottomMargin) - child.getMeasuredHeight(), childLeft + childWidth, height2 - lp.bottomMargin);
                            break;
                        default:
                            child.layout(childLeft, lp.topMargin, childLeft + childWidth, lp.topMargin + childHeight);
                            break;
                    }
                    if (changeOffset) {
                        setDrawerViewOffset(child, newOffset);
                    }
                    int newVisibility = lp.onScreen > 0.0f ? 0 : 4;
                    if (child.getVisibility() != newVisibility) {
                        child.setVisibility(newVisibility);
                    }
                }
            }
        }
        this.mInLayout = false;
        this.mFirstLayout = false;
    }
/* access modifiers changed from: protected */
access modifiers changed from: protected
access modifiers changed from : protected
public void onLayout(boolean changed, int l, int t, int r, int b) {
        int childLeft;
        float newOffset;
        this.mInLayout = true;
        int width = r - l;
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            View child = getChildAt(i);
            if (child.getVisibility() != 8) {
                LayoutParams lp = (LayoutParams) child.getLayoutParams();
                if (isContentView(child)) {
                    child.layout(lp.leftMargin, lp.topMargin, lp.leftMargin + child.getMeasuredWidth(), lp.topMargin + child.getMeasuredHeight());
                } else {
                    int childWidth = child.getMeasuredWidth();
                    int childHeight = child.getMeasuredHeight();
                    if (checkDrawerViewAbsoluteGravity(child, 3)) {
                        childLeft = (-childWidth) + ((int) (((float) childWidth) * lp.onScreen));
                        newOffset = ((float) (childWidth + childLeft)) / ((float) childWidth);
                    } else {
                        childLeft = width - ((int) (((float) childWidth) * lp.onScreen));
                        newOffset = ((float) (width - childLeft)) / ((float) childWidth);
                    }
                    boolean changeOffset = newOffset != lp.onScreen;
                    switch (lp.gravity & 112) {
                        case 16:
                            int height = b - t;
                            int childTop = (height - childHeight) / 2;
                            if (childTop < lp.topMargin) {
                                childTop = lp.topMargin;
                            } else {
                                if (childTop + childHeight > height - lp.bottomMargin) {
                                    childTop = (height - lp.bottomMargin) - childHeight;
                                }
                            }
                            child.layout(childLeft, childTop, childLeft + childWidth, childTop + childHeight);
                            break;
                        case 80:
                            int height2 = b - t;
                            child.layout(childLeft, (height2 - lp.bottomMargin) - child.getMeasuredHeight(), childLeft + childWidth, height2 - lp.bottomMargin);
                            break;
                        default:
                            child.layout(childLeft, lp.topMargin, childLeft + childWidth, lp.topMargin + childHeight);
                            break;
                    }
                    if (changeOffset) {
                        setDrawerViewOffset(child, newOffset);
                    }
                    int newVisibility = lp.onScreen > 0.0f ? 0 : 4;
                    if (child.getVisibility() != newVisibility) {
                        child.setVisibility(newVisibility);
                    }
                }
            }
        }
        this.mInLayout = false;
        this.mFirstLayout = false;
    }
public void onLayout ( boolean changed , int l , int t , int r , int b ) { int childLeft ; float newOffset ; this . mInLayout = true ; int width = r - l ; int childCount = getChildCount ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { View child = getChildAt ( i ) ; if ( child . getVisibility ( ) != 8 ) { LayoutParams lp = ( LayoutParams ) child . getLayoutParams ( ) ; if ( isContentView ( child ) ) { child . layout ( lp . leftMargin , lp . topMargin , lp . leftMargin + child . getMeasuredWidth ( ) , lp . topMargin + child . getMeasuredHeight ( ) ) ; } else { int childWidth = child . getMeasuredWidth ( ) ; int childHeight = child . getMeasuredHeight ( ) ; if ( checkDrawerViewAbsoluteGravity ( child , 3 ) ) { childLeft = ( - childWidth ) + ( ( int ) ( ( ( float ) childWidth ) * lp . onScreen ) ) ; newOffset = ( ( float ) ( childWidth + childLeft ) ) / ( ( float ) childWidth ) ; } else { childLeft = width - ( ( int ) ( ( ( float ) childWidth ) * lp . onScreen ) ) ; newOffset = ( ( float ) ( width - childLeft ) ) / ( ( float ) childWidth ) ; } boolean changeOffset = newOffset != lp . onScreen ; switch ( lp . gravity & 112 ) { case 16 : int height = b - t ; int childTop = ( height - childHeight ) / 2 ; if ( childTop < lp . topMargin ) { childTop = lp . topMargin ; } else { if ( childTop + childHeight > height - lp . bottomMargin ) { childTop = ( height - lp . bottomMargin ) - childHeight ; } } child . layout ( childLeft , childTop , childLeft + childWidth , childTop + childHeight ) ; break ; case 80 : int height2 = b - t ; child . layout ( childLeft , ( height2 - lp . bottomMargin ) - child . getMeasuredHeight ( ) , childLeft + childWidth , height2 - lp . bottomMargin ) ; break ; default : child . layout ( childLeft , lp . topMargin , childLeft + childWidth , lp . topMargin + childHeight ) ; break ; } if ( changeOffset ) { setDrawerViewOffset ( child , newOffset ) ; } int newVisibility = lp . onScreen > 0.0f ? 0 : 4 ; if ( child . getVisibility ( ) != newVisibility ) { child . setVisibility ( newVisibility ) ; } } } } this . mInLayout = false ; this . mFirstLayout = false ; }
access modifiers changed from: protected
access modifiers changed from : protected