2021-06-27 20:44:35 +00:00
package androidx.appcompat.widget ;
import android.content.Context ;
import android.content.res.TypedArray ;
import android.graphics.Canvas ;
import android.graphics.drawable.Drawable ;
import android.util.AttributeSet ;
import android.view.View ;
import android.view.ViewGroup ;
import android.view.accessibility.AccessibilityEvent ;
import android.view.accessibility.AccessibilityNodeInfo ;
import androidx.annotation.NonNull ;
import androidx.annotation.Nullable ;
import androidx.annotation.RestrictTo ;
import androidx.appcompat.R ;
import androidx.core.view.GravityCompat ;
import androidx.core.view.ViewCompat ;
import c.d.b.a.a ;
import java.lang.annotation.Retention ;
import java.lang.annotation.RetentionPolicy ;
public class LinearLayoutCompat extends ViewGroup {
private static final String ACCESSIBILITY_CLASS_NAME = " androidx.appcompat.widget.LinearLayoutCompat " ;
public static final int HORIZONTAL = 0 ;
private static final int INDEX_BOTTOM = 2 ;
private static final int INDEX_CENTER_VERTICAL = 0 ;
private static final int INDEX_FILL = 3 ;
private static final int INDEX_TOP = 1 ;
public static final int SHOW_DIVIDER_BEGINNING = 1 ;
public static final int SHOW_DIVIDER_END = 4 ;
public static final int SHOW_DIVIDER_MIDDLE = 2 ;
public static final int SHOW_DIVIDER_NONE = 0 ;
public static final int VERTICAL = 1 ;
private static final int VERTICAL_GRAVITY_COUNT = 4 ;
private boolean mBaselineAligned ;
private int mBaselineAlignedChildIndex ;
private int mBaselineChildTop ;
private Drawable mDivider ;
private int mDividerHeight ;
private int mDividerPadding ;
private int mDividerWidth ;
private int mGravity ;
private int [ ] mMaxAscent ;
private int [ ] mMaxDescent ;
private int mOrientation ;
private int mShowDividers ;
private int mTotalLength ;
private boolean mUseLargestChild ;
private float mWeightSum ;
@Retention ( RetentionPolicy . SOURCE )
@RestrictTo ( { RestrictTo . Scope . LIBRARY_GROUP_PREFIX } )
public @interface DividerMode {
}
public static class LayoutParams extends ViewGroup . MarginLayoutParams {
public int gravity ;
public float weight ;
public LayoutParams ( int i , int i2 ) {
super ( i , i2 ) ;
this . gravity = - 1 ;
this . weight = 0 . 0f ;
}
public LayoutParams ( int i , int i2 , float f ) {
super ( i , i2 ) ;
this . gravity = - 1 ;
this . weight = f ;
}
public LayoutParams ( Context context , AttributeSet attributeSet ) {
super ( context , attributeSet ) ;
this . gravity = - 1 ;
TypedArray obtainStyledAttributes = context . obtainStyledAttributes ( attributeSet , R . styleable . LinearLayoutCompat_Layout ) ;
this . weight = obtainStyledAttributes . getFloat ( R . styleable . LinearLayoutCompat_Layout_android_layout_weight , 0 . 0f ) ;
this . gravity = obtainStyledAttributes . getInt ( R . styleable . LinearLayoutCompat_Layout_android_layout_gravity , - 1 ) ;
obtainStyledAttributes . recycle ( ) ;
}
public LayoutParams ( ViewGroup . LayoutParams layoutParams ) {
super ( layoutParams ) ;
this . gravity = - 1 ;
}
public LayoutParams ( ViewGroup . MarginLayoutParams marginLayoutParams ) {
super ( marginLayoutParams ) ;
this . gravity = - 1 ;
}
public LayoutParams ( LayoutParams layoutParams ) {
super ( ( ViewGroup . MarginLayoutParams ) layoutParams ) ;
this . gravity = - 1 ;
this . weight = layoutParams . weight ;
this . gravity = layoutParams . gravity ;
}
}
@Retention ( RetentionPolicy . SOURCE )
@RestrictTo ( { RestrictTo . Scope . LIBRARY_GROUP_PREFIX } )
public @interface OrientationMode {
}
public LinearLayoutCompat ( @NonNull Context context ) {
this ( context , null ) ;
}
public LinearLayoutCompat ( @NonNull Context context , @Nullable AttributeSet attributeSet ) {
this ( context , attributeSet , 0 ) ;
}
public LinearLayoutCompat ( @NonNull Context context , @Nullable AttributeSet attributeSet , int i ) {
super ( context , attributeSet , i ) ;
this . mBaselineAligned = true ;
this . mBaselineAlignedChildIndex = - 1 ;
this . mBaselineChildTop = 0 ;
this . mGravity = 8388659 ;
int [ ] iArr = R . styleable . LinearLayoutCompat ;
TintTypedArray obtainStyledAttributes = TintTypedArray . obtainStyledAttributes ( context , attributeSet , iArr , i , 0 ) ;
ViewCompat . saveAttributeDataForStyleable ( this , context , iArr , attributeSet , obtainStyledAttributes . getWrappedTypeArray ( ) , i , 0 ) ;
int i2 = obtainStyledAttributes . getInt ( R . styleable . LinearLayoutCompat_android_orientation , - 1 ) ;
if ( i2 > = 0 ) {
setOrientation ( i2 ) ;
}
int i3 = obtainStyledAttributes . getInt ( R . styleable . LinearLayoutCompat_android_gravity , - 1 ) ;
if ( i3 > = 0 ) {
setGravity ( i3 ) ;
}
boolean z2 = obtainStyledAttributes . getBoolean ( R . styleable . LinearLayoutCompat_android_baselineAligned , true ) ;
if ( ! z2 ) {
setBaselineAligned ( z2 ) ;
}
this . mWeightSum = obtainStyledAttributes . getFloat ( R . styleable . LinearLayoutCompat_android_weightSum , - 1 . 0f ) ;
this . mBaselineAlignedChildIndex = obtainStyledAttributes . getInt ( R . styleable . LinearLayoutCompat_android_baselineAlignedChildIndex , - 1 ) ;
this . mUseLargestChild = obtainStyledAttributes . getBoolean ( R . styleable . LinearLayoutCompat_measureWithLargestChild , false ) ;
setDividerDrawable ( obtainStyledAttributes . getDrawable ( R . styleable . LinearLayoutCompat_divider ) ) ;
this . mShowDividers = obtainStyledAttributes . getInt ( R . styleable . LinearLayoutCompat_showDividers , 0 ) ;
this . mDividerPadding = obtainStyledAttributes . getDimensionPixelSize ( R . styleable . LinearLayoutCompat_dividerPadding , 0 ) ;
obtainStyledAttributes . recycle ( ) ;
}
private void forceUniformHeight ( int i , int i2 ) {
int makeMeasureSpec = View . MeasureSpec . makeMeasureSpec ( getMeasuredHeight ( ) , 1073741824 ) ;
for ( int i3 = 0 ; i3 < i ; i3 + + ) {
View virtualChildAt = getVirtualChildAt ( i3 ) ;
if ( virtualChildAt . getVisibility ( ) ! = 8 ) {
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = = - 1 ) {
int i4 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width ;
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = virtualChildAt . getMeasuredWidth ( ) ;
measureChildWithMargins ( virtualChildAt , i2 , 0 , makeMeasureSpec , 0 ) ;
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = i4 ;
}
}
}
}
private void forceUniformWidth ( int i , int i2 ) {
int makeMeasureSpec = View . MeasureSpec . makeMeasureSpec ( getMeasuredWidth ( ) , 1073741824 ) ;
for ( int i3 = 0 ; i3 < i ; i3 + + ) {
View virtualChildAt = getVirtualChildAt ( i3 ) ;
if ( virtualChildAt . getVisibility ( ) ! = 8 ) {
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = = - 1 ) {
int i4 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height ;
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = virtualChildAt . getMeasuredHeight ( ) ;
measureChildWithMargins ( virtualChildAt , makeMeasureSpec , 0 , i2 , 0 ) ;
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = i4 ;
}
}
}
}
private void setChildFrame ( View view , int i , int i2 , int i3 , int i4 ) {
view . layout ( i , i2 , i3 + i , i4 + i2 ) ;
}
@Override // android.view.ViewGroup
public boolean checkLayoutParams ( ViewGroup . LayoutParams layoutParams ) {
return layoutParams instanceof LayoutParams ;
}
public void drawDividersHorizontal ( Canvas canvas ) {
int i ;
int i2 ;
int i3 ;
int virtualChildCount = getVirtualChildCount ( ) ;
boolean isLayoutRtl = ViewUtils . isLayoutRtl ( this ) ;
for ( int i4 = 0 ; i4 < virtualChildCount ; i4 + + ) {
View virtualChildAt = getVirtualChildAt ( i4 ) ;
if ( ! ( virtualChildAt = = null | | virtualChildAt . getVisibility ( ) = = 8 | | ! hasDividerBeforeChildAt ( i4 ) ) ) {
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
drawVerticalDivider ( canvas , isLayoutRtl ? virtualChildAt . getRight ( ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin : ( virtualChildAt . getLeft ( ) - ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin ) - this . mDividerWidth ) ;
}
}
if ( hasDividerBeforeChildAt ( virtualChildCount ) ) {
View virtualChildAt2 = getVirtualChildAt ( virtualChildCount - 1 ) ;
if ( virtualChildAt2 ! = null ) {
LayoutParams layoutParams2 = ( LayoutParams ) virtualChildAt2 . getLayoutParams ( ) ;
if ( isLayoutRtl ) {
i3 = virtualChildAt2 . getLeft ( ) - ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . leftMargin ;
i2 = this . mDividerWidth ;
} else {
i = virtualChildAt2 . getRight ( ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . rightMargin ;
drawVerticalDivider ( canvas , i ) ;
}
} else if ( isLayoutRtl ) {
i = getPaddingLeft ( ) ;
drawVerticalDivider ( canvas , i ) ;
} else {
i3 = getWidth ( ) - getPaddingRight ( ) ;
i2 = this . mDividerWidth ;
}
i = i3 - i2 ;
drawVerticalDivider ( canvas , i ) ;
}
}
public void drawDividersVertical ( Canvas canvas ) {
int virtualChildCount = getVirtualChildCount ( ) ;
for ( int i = 0 ; i < virtualChildCount ; i + + ) {
View virtualChildAt = getVirtualChildAt ( i ) ;
if ( ! ( virtualChildAt = = null | | virtualChildAt . getVisibility ( ) = = 8 | | ! hasDividerBeforeChildAt ( i ) ) ) {
drawHorizontalDivider ( canvas , ( virtualChildAt . getTop ( ) - ( ( ViewGroup . MarginLayoutParams ) ( ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ) ) . topMargin ) - this . mDividerHeight ) ;
}
}
if ( hasDividerBeforeChildAt ( virtualChildCount ) ) {
View virtualChildAt2 = getVirtualChildAt ( virtualChildCount - 1 ) ;
drawHorizontalDivider ( canvas , virtualChildAt2 = = null ? ( getHeight ( ) - getPaddingBottom ( ) ) - this . mDividerHeight : virtualChildAt2 . getBottom ( ) + ( ( ViewGroup . MarginLayoutParams ) ( ( LayoutParams ) virtualChildAt2 . getLayoutParams ( ) ) ) . bottomMargin ) ;
}
}
public void drawHorizontalDivider ( Canvas canvas , int i ) {
this . mDivider . setBounds ( getPaddingLeft ( ) + this . mDividerPadding , i , ( getWidth ( ) - getPaddingRight ( ) ) - this . mDividerPadding , this . mDividerHeight + i ) ;
this . mDivider . draw ( canvas ) ;
}
public void drawVerticalDivider ( Canvas canvas , int i ) {
this . mDivider . setBounds ( i , getPaddingTop ( ) + this . mDividerPadding , this . mDividerWidth + i , ( getHeight ( ) - getPaddingBottom ( ) ) - this . mDividerPadding ) ;
this . mDivider . draw ( canvas ) ;
}
@Override // android.view.ViewGroup
public LayoutParams generateDefaultLayoutParams ( ) {
int i = this . mOrientation ;
if ( i = = 0 ) {
return new LayoutParams ( - 2 , - 2 ) ;
}
if ( i = = 1 ) {
return new LayoutParams ( - 1 , - 2 ) ;
}
return null ;
}
@Override // android.view.ViewGroup
public LayoutParams generateLayoutParams ( AttributeSet attributeSet ) {
return new LayoutParams ( getContext ( ) , attributeSet ) ;
}
@Override // android.view.ViewGroup
public LayoutParams generateLayoutParams ( ViewGroup . LayoutParams layoutParams ) {
return new LayoutParams ( layoutParams ) ;
}
@Override // android.view.View
public int getBaseline ( ) {
int i ;
if ( this . mBaselineAlignedChildIndex < 0 ) {
return super . getBaseline ( ) ;
}
int childCount = getChildCount ( ) ;
int i2 = this . mBaselineAlignedChildIndex ;
if ( childCount > i2 ) {
View childAt = getChildAt ( i2 ) ;
int baseline = childAt . getBaseline ( ) ;
if ( baseline ! = - 1 ) {
int i3 = this . mBaselineChildTop ;
if ( this . mOrientation = = 1 & & ( i = this . mGravity & 112 ) ! = 48 ) {
if ( i = = 16 ) {
i3 + = ( ( ( ( getBottom ( ) - getTop ( ) ) - getPaddingTop ( ) ) - getPaddingBottom ( ) ) - this . mTotalLength ) / 2 ;
} else if ( i = = 80 ) {
i3 = ( ( getBottom ( ) - getTop ( ) ) - getPaddingBottom ( ) ) - this . mTotalLength ;
}
}
return i3 + ( ( ViewGroup . MarginLayoutParams ) ( ( LayoutParams ) childAt . getLayoutParams ( ) ) ) . topMargin + baseline ;
} else if ( this . mBaselineAlignedChildIndex = = 0 ) {
return - 1 ;
} else {
throw new RuntimeException ( " mBaselineAlignedChildIndex of LinearLayout points to a View that doesn't know how to get its baseline. " ) ;
}
} else {
throw new RuntimeException ( " mBaselineAlignedChildIndex of LinearLayout set to an index that is out of bounds. " ) ;
}
}
public int getBaselineAlignedChildIndex ( ) {
return this . mBaselineAlignedChildIndex ;
}
public int getChildrenSkipCount ( View view , int i ) {
return 0 ;
}
public Drawable getDividerDrawable ( ) {
return this . mDivider ;
}
public int getDividerPadding ( ) {
return this . mDividerPadding ;
}
@RestrictTo ( { RestrictTo . Scope . LIBRARY_GROUP_PREFIX } )
public int getDividerWidth ( ) {
return this . mDividerWidth ;
}
public int getGravity ( ) {
return this . mGravity ;
}
public int getLocationOffset ( View view ) {
return 0 ;
}
public int getNextLocationOffset ( View view ) {
return 0 ;
}
public int getOrientation ( ) {
return this . mOrientation ;
}
public int getShowDividers ( ) {
return this . mShowDividers ;
}
public View getVirtualChildAt ( int i ) {
return getChildAt ( i ) ;
}
public int getVirtualChildCount ( ) {
return getChildCount ( ) ;
}
public float getWeightSum ( ) {
return this . mWeightSum ;
}
@RestrictTo ( { RestrictTo . Scope . LIBRARY } )
public boolean hasDividerBeforeChildAt ( int i ) {
if ( i = = 0 ) {
return ( this . mShowDividers & 1 ) ! = 0 ;
}
if ( i = = getChildCount ( ) ) {
return ( this . mShowDividers & 4 ) ! = 0 ;
}
if ( ( this . mShowDividers & 2 ) = = 0 ) {
return false ;
}
for ( int i2 = i - 1 ; i2 > = 0 ; i2 - - ) {
if ( getChildAt ( i2 ) . getVisibility ( ) ! = 8 ) {
return true ;
}
}
return false ;
}
public boolean isBaselineAligned ( ) {
return this . mBaselineAligned ;
}
public boolean isMeasureWithLargestChildEnabled ( ) {
return this . mUseLargestChild ;
}
/* JADX WARNING: Removed duplicated region for block: B:27:0x00a8 */
/* JADX WARNING: Removed duplicated region for block: B:30:0x00b1 */
/* JADX WARNING: Removed duplicated region for block: B:42:0x00e6 */
/* JADX WARNING: Removed duplicated region for block: B:45:0x00fa */
public void layoutHorizontal ( int i , int i2 , int i3 , int i4 ) {
int i5 ;
int i6 ;
int i7 ;
int i8 ;
int i9 ;
int i10 ;
int i11 ;
int i12 ;
int i13 ;
boolean isLayoutRtl = ViewUtils . isLayoutRtl ( this ) ;
int paddingTop = getPaddingTop ( ) ;
int i14 = i4 - i2 ;
int paddingBottom = i14 - getPaddingBottom ( ) ;
int paddingBottom2 = ( i14 - paddingTop ) - getPaddingBottom ( ) ;
int virtualChildCount = getVirtualChildCount ( ) ;
int i15 = this . mGravity ;
int i16 = i15 & 112 ;
boolean z2 = this . mBaselineAligned ;
int [ ] iArr = this . mMaxAscent ;
int [ ] iArr2 = this . mMaxDescent ;
int absoluteGravity = GravityCompat . getAbsoluteGravity ( 8388615 & i15 , ViewCompat . getLayoutDirection ( this ) ) ;
int paddingLeft = absoluteGravity ! = 1 ? absoluteGravity ! = 5 ? getPaddingLeft ( ) : ( ( getPaddingLeft ( ) + i3 ) - i ) - this . mTotalLength : getPaddingLeft ( ) + ( ( ( i3 - i ) - this . mTotalLength ) / 2 ) ;
if ( isLayoutRtl ) {
i6 = virtualChildCount - 1 ;
i5 = - 1 ;
} else {
i6 = 0 ;
i5 = 1 ;
}
int i17 = 0 ;
while ( i17 < virtualChildCount ) {
int i18 = ( i5 * i17 ) + i6 ;
View virtualChildAt = getVirtualChildAt ( i18 ) ;
if ( virtualChildAt = = null ) {
paddingLeft = measureNullChild ( i18 ) + paddingLeft ;
} else if ( virtualChildAt . getVisibility ( ) ! = 8 ) {
int measuredWidth = virtualChildAt . getMeasuredWidth ( ) ;
int measuredHeight = virtualChildAt . getMeasuredHeight ( ) ;
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
if ( z2 ) {
i9 = virtualChildCount ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height ! = - 1 ) {
i10 = virtualChildAt . getBaseline ( ) ;
i11 = layoutParams . gravity ;
if ( i11 < 0 ) {
i11 = i16 ;
}
i12 = i11 & 112 ;
i8 = i16 ;
if ( i12 ! = 16 ) {
i13 = ( ( ( ( paddingBottom2 - measuredHeight ) / 2 ) + paddingTop ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin ) - ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin ;
} else if ( i12 = = 48 ) {
i13 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin + paddingTop ;
if ( i10 ! = - 1 ) {
i13 = ( iArr [ 1 ] - i10 ) + i13 ;
}
} else if ( i12 ! = 80 ) {
i13 = paddingTop ;
} else {
i13 = ( paddingBottom - measuredHeight ) - ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin ;
if ( i10 ! = - 1 ) {
i13 - = iArr2 [ 2 ] - ( virtualChildAt . getMeasuredHeight ( ) - i10 ) ;
}
}
if ( hasDividerBeforeChildAt ( i18 ) ) {
paddingLeft + = this . mDividerWidth ;
}
int i19 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + paddingLeft ;
i7 = paddingTop ;
setChildFrame ( virtualChildAt , getLocationOffset ( virtualChildAt ) + i19 , i13 , measuredWidth , measuredHeight ) ;
paddingLeft = getNextLocationOffset ( virtualChildAt ) + measuredWidth + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin + i19 ;
i17 = getChildrenSkipCount ( virtualChildAt , i18 ) + i17 ;
i17 + + ;
virtualChildCount = i9 ;
i16 = i8 ;
paddingTop = i7 ;
}
} else {
i9 = virtualChildCount ;
}
i10 = - 1 ;
i11 = layoutParams . gravity ;
if ( i11 < 0 ) {
}
i12 = i11 & 112 ;
i8 = i16 ;
if ( i12 ! = 16 ) {
}
if ( hasDividerBeforeChildAt ( i18 ) ) {
}
int i19 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + paddingLeft ;
i7 = paddingTop ;
setChildFrame ( virtualChildAt , getLocationOffset ( virtualChildAt ) + i19 , i13 , measuredWidth , measuredHeight ) ;
paddingLeft = getNextLocationOffset ( virtualChildAt ) + measuredWidth + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin + i19 ;
i17 = getChildrenSkipCount ( virtualChildAt , i18 ) + i17 ;
i17 + + ;
virtualChildCount = i9 ;
i16 = i8 ;
paddingTop = i7 ;
}
i7 = paddingTop ;
i9 = virtualChildCount ;
i8 = i16 ;
i17 + + ;
virtualChildCount = i9 ;
i16 = i8 ;
paddingTop = i7 ;
}
}
/* JADX WARNING: Removed duplicated region for block: B:27:0x00a0 */
public void layoutVertical ( int i , int i2 , int i3 , int i4 ) {
int i5 ;
int i6 ;
int i7 ;
int paddingLeft = getPaddingLeft ( ) ;
int i8 = i3 - i ;
int paddingRight = i8 - getPaddingRight ( ) ;
int paddingRight2 = ( i8 - paddingLeft ) - getPaddingRight ( ) ;
int virtualChildCount = getVirtualChildCount ( ) ;
int i9 = this . mGravity ;
int i10 = i9 & 112 ;
int i11 = i9 & 8388615 ;
int paddingTop = i10 ! = 16 ? i10 ! = 80 ? getPaddingTop ( ) : ( ( getPaddingTop ( ) + i4 ) - i2 ) - this . mTotalLength : getPaddingTop ( ) + ( ( ( i4 - i2 ) - this . mTotalLength ) / 2 ) ;
int i12 = 0 ;
while ( i12 < virtualChildCount ) {
View virtualChildAt = getVirtualChildAt ( i12 ) ;
if ( virtualChildAt = = null ) {
paddingTop = measureNullChild ( i12 ) + paddingTop ;
} else if ( virtualChildAt . getVisibility ( ) ! = 8 ) {
int measuredWidth = virtualChildAt . getMeasuredWidth ( ) ;
int measuredHeight = virtualChildAt . getMeasuredHeight ( ) ;
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
int i13 = layoutParams . gravity ;
if ( i13 < 0 ) {
i13 = i11 ;
}
int absoluteGravity = GravityCompat . getAbsoluteGravity ( i13 , ViewCompat . getLayoutDirection ( this ) ) & 7 ;
if ( absoluteGravity = = 1 ) {
i7 = ( ( paddingRight2 - measuredWidth ) / 2 ) + paddingLeft + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin ;
i6 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin ;
} else if ( absoluteGravity ! = 5 ) {
i5 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + paddingLeft ;
if ( hasDividerBeforeChildAt ( i12 ) ) {
paddingTop + = this . mDividerHeight ;
}
int i14 = paddingTop + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin ;
setChildFrame ( virtualChildAt , i5 , getLocationOffset ( virtualChildAt ) + i14 , measuredWidth , measuredHeight ) ;
paddingTop = getNextLocationOffset ( virtualChildAt ) + measuredHeight + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin + i14 ;
i12 + = getChildrenSkipCount ( virtualChildAt , i12 ) ;
} else {
i7 = paddingRight - measuredWidth ;
i6 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin ;
}
i5 = i7 - i6 ;
if ( hasDividerBeforeChildAt ( i12 ) ) {
}
int i14 = paddingTop + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin ;
setChildFrame ( virtualChildAt , i5 , getLocationOffset ( virtualChildAt ) + i14 , measuredWidth , measuredHeight ) ;
paddingTop = getNextLocationOffset ( virtualChildAt ) + measuredHeight + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin + i14 ;
i12 + = getChildrenSkipCount ( virtualChildAt , i12 ) ;
}
i12 + + ;
}
}
public void measureChildBeforeLayout ( View view , int i , int i2 , int i3 , int i4 , int i5 ) {
measureChildWithMargins ( view , i2 , i3 , i4 , i5 ) ;
}
/* JADX WARNING: Removed duplicated region for block: B:186:0x044e */
/* JADX WARNING: Removed duplicated region for block: B:65:0x0195 */
/* JADX WARNING: Removed duplicated region for block: B:75:0x01c9 */
/* JADX WARNING: Removed duplicated region for block: B:78:0x01d4 */
public void measureHorizontal ( int i , int i2 ) {
int i3 ;
int i4 ;
int i5 ;
int i6 ;
int i7 ;
int i8 ;
int i9 ;
int i10 ;
float f ;
int i11 ;
boolean z2 ;
int baseline ;
int i12 ;
int i13 ;
int i14 ;
boolean z3 ;
boolean z4 ;
int i15 ;
int i16 ;
View view ;
int i17 ;
boolean z5 ;
int measuredHeight ;
int baseline2 ;
int i18 ;
int i19 ;
this . mTotalLength = 0 ;
int virtualChildCount = getVirtualChildCount ( ) ;
int mode = View . MeasureSpec . getMode ( i ) ;
int mode2 = View . MeasureSpec . getMode ( i2 ) ;
if ( this . mMaxAscent = = null | | this . mMaxDescent = = null ) {
this . mMaxAscent = new int [ 4 ] ;
this . mMaxDescent = new int [ 4 ] ;
}
int [ ] iArr = this . mMaxAscent ;
int [ ] iArr2 = this . mMaxDescent ;
iArr [ 3 ] = - 1 ;
iArr [ 2 ] = - 1 ;
iArr [ 1 ] = - 1 ;
iArr [ 0 ] = - 1 ;
iArr2 [ 3 ] = - 1 ;
iArr2 [ 2 ] = - 1 ;
iArr2 [ 1 ] = - 1 ;
iArr2 [ 0 ] = - 1 ;
boolean z6 = this . mBaselineAligned ;
boolean z7 = this . mUseLargestChild ;
int i20 = 1073741824 ;
boolean z8 = mode = = 1073741824 ;
float f2 = 0 . 0f ;
int i21 = 0 ;
int i22 = 0 ;
int i23 = 0 ;
int i24 = 0 ;
int i25 = 0 ;
boolean z9 = false ;
int i26 = 0 ;
boolean z10 = true ;
boolean z11 = false ;
while ( i21 < virtualChildCount ) {
View virtualChildAt = getVirtualChildAt ( i21 ) ;
if ( virtualChildAt = = null ) {
this . mTotalLength = measureNullChild ( i21 ) + this . mTotalLength ;
} else if ( virtualChildAt . getVisibility ( ) = = 8 ) {
i21 + = getChildrenSkipCount ( virtualChildAt , i21 ) ;
} else {
if ( hasDividerBeforeChildAt ( i21 ) ) {
this . mTotalLength + = this . mDividerWidth ;
}
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
float f3 = layoutParams . weight ;
float f4 = f2 + f3 ;
if ( mode = = i20 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = = 0 & & f3 > 0 . 0f ) {
if ( z8 ) {
this . mTotalLength = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin + this . mTotalLength ;
} else {
int i27 = this . mTotalLength ;
this . mTotalLength = Math . max ( i27 , ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + i27 + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin ) ;
}
if ( z6 ) {
int makeMeasureSpec = View . MeasureSpec . makeMeasureSpec ( 0 , 0 ) ;
virtualChildAt . measure ( makeMeasureSpec , makeMeasureSpec ) ;
i16 = i21 ;
z4 = z7 ;
z3 = z6 ;
view = virtualChildAt ;
} else {
i16 = i21 ;
z4 = z7 ;
z3 = z6 ;
view = virtualChildAt ;
i17 = 1073741824 ;
z9 = true ;
if ( mode2 = = i17 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = = - 1 ) {
z5 = true ;
z11 = true ;
} else {
z5 = false ;
}
int i28 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin ;
measuredHeight = view . getMeasuredHeight ( ) + i28 ;
i26 = View . combineMeasuredStates ( i26 , view . getMeasuredState ( ) ) ;
if ( z3 & & ( baseline2 = view . getBaseline ( ) ) ! = - 1 ) {
i18 = layoutParams . gravity ;
if ( i18 < 0 ) {
i18 = this . mGravity ;
}
int i29 = ( ( ( i18 & 112 ) > > 4 ) & - 2 ) > > 1 ;
iArr [ i29 ] = Math . max ( iArr [ i29 ] , baseline2 ) ;
iArr2 [ i29 ] = Math . max ( iArr2 [ i29 ] , measuredHeight - baseline2 ) ;
}
i23 = Math . max ( i23 , measuredHeight ) ;
z10 = ! z10 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = = - 1 ;
if ( layoutParams . weight < = 0 . 0f ) {
if ( ! z5 ) {
i28 = measuredHeight ;
}
i25 = Math . max ( i25 , i28 ) ;
} else {
if ( ! z5 ) {
i28 = measuredHeight ;
}
i24 = Math . max ( i24 , i28 ) ;
i25 = i25 ;
}
i15 = getChildrenSkipCount ( view , i16 ) + i16 ;
f2 = f4 ;
i21 = i15 + 1 ;
iArr2 = iArr2 ;
z7 = z4 ;
z6 = z3 ;
i20 = 1073741824 ;
}
} else {
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width ! = 0 | | f3 < = 0 . 0f ) {
i19 = Integer . MIN_VALUE ;
} else {
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = - 2 ;
i19 = 0 ;
}
i16 = i21 ;
z4 = z7 ;
z3 = z6 ;
measureChildBeforeLayout ( virtualChildAt , i16 , i , f4 = = 0 . 0f ? this . mTotalLength : 0 , i2 , 0 ) ;
if ( i19 ! = Integer . MIN_VALUE ) {
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = i19 ;
}
int measuredWidth = virtualChildAt . getMeasuredWidth ( ) ;
if ( z8 ) {
view = virtualChildAt ;
this . mTotalLength = getNextLocationOffset ( view ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + measuredWidth + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin + this . mTotalLength ;
} else {
view = virtualChildAt ;
int i30 = this . mTotalLength ;
this . mTotalLength = Math . max ( i30 , getNextLocationOffset ( view ) + i30 + measuredWidth + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin ) ;
}
if ( z4 ) {
i22 = Math . max ( measuredWidth , i22 ) ;
}
}
i17 = 1073741824 ;
if ( mode2 = = i17 ) {
}
z5 = false ;
int i28 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin ;
measuredHeight = view . getMeasuredHeight ( ) + i28 ;
i26 = View . combineMeasuredStates ( i26 , view . getMeasuredState ( ) ) ;
i18 = layoutParams . gravity ;
if ( i18 < 0 ) {
}
int i29 = ( ( ( i18 & 112 ) > > 4 ) & - 2 ) > > 1 ;
iArr [ i29 ] = Math . max ( iArr [ i29 ] , baseline2 ) ;
iArr2 [ i29 ] = Math . max ( iArr2 [ i29 ] , measuredHeight - baseline2 ) ;
i23 = Math . max ( i23 , measuredHeight ) ;
if ( ! z10 ) {
}
if ( layoutParams . weight < = 0 . 0f ) {
}
i15 = getChildrenSkipCount ( view , i16 ) + i16 ;
f2 = f4 ;
i21 = i15 + 1 ;
iArr2 = iArr2 ;
z7 = z4 ;
z6 = z3 ;
i20 = 1073741824 ;
}
i15 = i21 ;
z4 = z7 ;
z3 = z6 ;
i21 = i15 + 1 ;
iArr2 = iArr2 ;
z7 = z4 ;
z6 = z3 ;
i20 = 1073741824 ;
}
if ( this . mTotalLength > 0 & & hasDividerBeforeChildAt ( virtualChildCount ) ) {
this . mTotalLength + = this . mDividerWidth ;
}
if ( iArr [ 1 ] = = - 1 & & iArr [ 0 ] = = - 1 & & iArr [ 2 ] = = - 1 & & iArr [ 3 ] = = - 1 ) {
i4 = i23 ;
i3 = i26 ;
} else {
i3 = i26 ;
i4 = Math . max ( i23 , Math . max ( iArr2 [ 3 ] , Math . max ( iArr2 [ 0 ] , Math . max ( iArr2 [ 1 ] , iArr2 [ 2 ] ) ) ) + Math . max ( iArr [ 3 ] , Math . max ( iArr [ 0 ] , Math . max ( iArr [ 1 ] , iArr [ 2 ] ) ) ) ) ;
}
if ( z7 & & ( mode = = Integer . MIN_VALUE | | mode = = 0 ) ) {
this . mTotalLength = 0 ;
int i31 = 0 ;
while ( i31 < virtualChildCount ) {
View virtualChildAt2 = getVirtualChildAt ( i31 ) ;
if ( virtualChildAt2 = = null ) {
this . mTotalLength = measureNullChild ( i31 ) + this . mTotalLength ;
} else if ( virtualChildAt2 . getVisibility ( ) = = 8 ) {
i31 + = getChildrenSkipCount ( virtualChildAt2 , i31 ) ;
} else {
LayoutParams layoutParams2 = ( LayoutParams ) virtualChildAt2 . getLayoutParams ( ) ;
if ( z8 ) {
this . mTotalLength = getNextLocationOffset ( virtualChildAt2 ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . leftMargin + i22 + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . rightMargin + this . mTotalLength ;
} else {
int i32 = this . mTotalLength ;
i14 = i4 ;
this . mTotalLength = Math . max ( i32 , getNextLocationOffset ( virtualChildAt2 ) + i32 + i22 + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . rightMargin ) ;
i31 + + ;
i4 = i14 ;
}
}
i14 = i4 ;
i31 + + ;
i4 = i14 ;
}
}
int paddingRight = getPaddingRight ( ) + getPaddingLeft ( ) + this . mTotalLength ;
this . mTotalLength = paddingRight ;
int resolveSizeAndState = View . resolveSizeAndState ( Math . max ( paddingRight , getSuggestedMinimumWidth ( ) ) , i , 0 ) ;
int i33 = ( 16777215 & resolveSizeAndState ) - this . mTotalLength ;
if ( z9 | | ( i33 ! = 0 & & f2 > 0 . 0f ) ) {
float f5 = this . mWeightSum ;
if ( f5 > 0 . 0f ) {
f2 = f5 ;
}
iArr [ 3 ] = - 1 ;
iArr [ 2 ] = - 1 ;
iArr [ 1 ] = - 1 ;
iArr [ 0 ] = - 1 ;
iArr2 [ 3 ] = - 1 ;
iArr2 [ 2 ] = - 1 ;
iArr2 [ 1 ] = - 1 ;
iArr2 [ 0 ] = - 1 ;
this . mTotalLength = 0 ;
int i34 = i24 ;
int i35 = i3 ;
int i36 = - 1 ;
int i37 = 0 ;
while ( i37 < virtualChildCount ) {
View virtualChildAt3 = getVirtualChildAt ( i37 ) ;
if ( virtualChildAt3 = = null | | virtualChildAt3 . getVisibility ( ) = = 8 ) {
i10 = i33 ;
i9 = virtualChildCount ;
} else {
LayoutParams layoutParams3 = ( LayoutParams ) virtualChildAt3 . getLayoutParams ( ) ;
float f6 = layoutParams3 . weight ;
if ( f6 > 0 . 0f ) {
int i38 = ( int ) ( ( ( ( float ) i33 ) * f6 ) / f2 ) ;
float f7 = f2 - f6 ;
int i39 = i33 - i38 ;
i9 = virtualChildCount ;
int childMeasureSpec = ViewGroup . getChildMeasureSpec ( i2 , getPaddingBottom ( ) + getPaddingTop ( ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . bottomMargin , ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . height ) ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . width = = 0 ) {
i13 = 1073741824 ;
if ( mode = = 1073741824 ) {
if ( i38 < = 0 ) {
i38 = 0 ;
}
virtualChildAt3 . measure ( View . MeasureSpec . makeMeasureSpec ( i38 , 1073741824 ) , childMeasureSpec ) ;
i35 = View . combineMeasuredStates ( i35 , virtualChildAt3 . getMeasuredState ( ) & - 16777216 ) ;
f2 = f7 ;
i10 = i39 ;
}
} else {
i13 = 1073741824 ;
}
int measuredWidth2 = virtualChildAt3 . getMeasuredWidth ( ) + i38 ;
if ( measuredWidth2 < 0 ) {
measuredWidth2 = 0 ;
}
virtualChildAt3 . measure ( View . MeasureSpec . makeMeasureSpec ( measuredWidth2 , i13 ) , childMeasureSpec ) ;
i35 = View . combineMeasuredStates ( i35 , virtualChildAt3 . getMeasuredState ( ) & - 16777216 ) ;
f2 = f7 ;
i10 = i39 ;
} else {
i10 = i33 ;
i9 = virtualChildCount ;
}
if ( z8 ) {
this . mTotalLength = getNextLocationOffset ( virtualChildAt3 ) + virtualChildAt3 . getMeasuredWidth ( ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . rightMargin + this . mTotalLength ;
f = f2 ;
} else {
int i40 = this . mTotalLength ;
f = f2 ;
this . mTotalLength = Math . max ( i40 , getNextLocationOffset ( virtualChildAt3 ) + virtualChildAt3 . getMeasuredWidth ( ) + i40 + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . rightMargin ) ;
}
boolean z12 = mode2 ! = 1073741824 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . height = = - 1 ;
int i41 = ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . bottomMargin ;
int measuredHeight2 = virtualChildAt3 . getMeasuredHeight ( ) + i41 ;
i36 = Math . max ( i36 , measuredHeight2 ) ;
if ( ! z12 ) {
i41 = measuredHeight2 ;
}
int max = Math . max ( i34 , i41 ) ;
if ( z10 ) {
i11 = - 1 ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . height = = - 1 ) {
z2 = true ;
if ( z6 & & ( baseline = virtualChildAt3 . getBaseline ( ) ) ! = i11 ) {
i12 = layoutParams3 . gravity ;
if ( i12 < 0 ) {
i12 = this . mGravity ;
}
int i42 = ( ( ( i12 & 112 ) > > 4 ) & - 2 ) > > 1 ;
iArr [ i42 ] = Math . max ( iArr [ i42 ] , baseline ) ;
iArr2 [ i42 ] = Math . max ( iArr2 [ i42 ] , measuredHeight2 - baseline ) ;
}
z10 = z2 ;
i34 = max ;
f2 = f ;
}
} else {
i11 = - 1 ;
}
z2 = false ;
i12 = layoutParams3 . gravity ;
if ( i12 < 0 ) {
}
int i42 = ( ( ( i12 & 112 ) > > 4 ) & - 2 ) > > 1 ;
iArr [ i42 ] = Math . max ( iArr [ i42 ] , baseline ) ;
iArr2 [ i42 ] = Math . max ( iArr2 [ i42 ] , measuredHeight2 - baseline ) ;
z10 = z2 ;
i34 = max ;
f2 = f ;
}
i37 + + ;
i33 = i10 ;
virtualChildCount = i9 ;
}
i7 = i2 ;
i5 = virtualChildCount ;
this . mTotalLength = getPaddingRight ( ) + getPaddingLeft ( ) + this . mTotalLength ;
i6 = ( iArr [ 1 ] = = - 1 & & iArr [ 0 ] = = - 1 & & iArr [ 2 ] = = - 1 & & iArr [ 3 ] = = - 1 ) ? i36 : Math . max ( i36 , Math . max ( iArr2 [ 3 ] , Math . max ( iArr2 [ 0 ] , Math . max ( iArr2 [ 1 ] , iArr2 [ 2 ] ) ) ) + Math . max ( iArr [ 3 ] , Math . max ( iArr [ 0 ] , Math . max ( iArr [ 1 ] , iArr [ 2 ] ) ) ) ) ;
i8 = i34 ;
i3 = i35 ;
} else {
i8 = Math . max ( i24 , i25 ) ;
if ( z7 & & mode ! = 1073741824 ) {
for ( int i43 = 0 ; i43 < virtualChildCount ; i43 + + ) {
View virtualChildAt4 = getVirtualChildAt ( i43 ) ;
if ( ! ( virtualChildAt4 = = null | | virtualChildAt4 . getVisibility ( ) = = 8 | | ( ( LayoutParams ) virtualChildAt4 . getLayoutParams ( ) ) . weight < = 0 . 0f ) ) {
virtualChildAt4 . measure ( View . MeasureSpec . makeMeasureSpec ( i22 , 1073741824 ) , View . MeasureSpec . makeMeasureSpec ( virtualChildAt4 . getMeasuredHeight ( ) , 1073741824 ) ) ;
}
}
}
i7 = i2 ;
i5 = virtualChildCount ;
i6 = i4 ;
}
if ( z10 | | mode2 = = 1073741824 ) {
i8 = i6 ;
}
setMeasuredDimension ( resolveSizeAndState | ( i3 & - 16777216 ) , View . resolveSizeAndState ( Math . max ( getPaddingBottom ( ) + getPaddingTop ( ) + i8 , getSuggestedMinimumHeight ( ) ) , i7 , i3 < < 16 ) ) ;
if ( z11 ) {
forceUniformHeight ( i5 , i ) ;
}
}
public int measureNullChild ( int i ) {
return 0 ;
}
/* JADX WARNING: Removed duplicated region for block: B:140:0x0325 */
public void measureVertical ( int i , int i2 ) {
int i3 ;
int i4 ;
int i5 ;
int i6 ;
int i7 ;
int i8 ;
int i9 ;
boolean z2 ;
int i10 ;
int i11 ;
int i12 ;
int i13 ;
int i14 ;
int i15 ;
int i16 ;
int i17 ;
View view ;
int i18 ;
boolean z3 ;
int i19 ;
int i20 ;
this . mTotalLength = 0 ;
int virtualChildCount = getVirtualChildCount ( ) ;
int mode = View . MeasureSpec . getMode ( i ) ;
int mode2 = View . MeasureSpec . getMode ( i2 ) ;
int i21 = this . mBaselineAlignedChildIndex ;
boolean z4 = this . mUseLargestChild ;
float f = 0 . 0f ;
int i22 = 0 ;
int i23 = 0 ;
int i24 = 0 ;
int i25 = 0 ;
int i26 = 0 ;
int i27 = 0 ;
boolean z5 = false ;
boolean z6 = true ;
boolean z7 = false ;
while ( true ) {
int i28 = 8 ;
if ( i27 < virtualChildCount ) {
View virtualChildAt = getVirtualChildAt ( i27 ) ;
if ( virtualChildAt = = null ) {
this . mTotalLength = measureNullChild ( i27 ) + this . mTotalLength ;
i11 = virtualChildCount ;
i12 = mode2 ;
i25 = i25 ;
} else if ( virtualChildAt . getVisibility ( ) = = 8 ) {
i27 + = getChildrenSkipCount ( virtualChildAt , i27 ) ;
i11 = virtualChildCount ;
i25 = i25 ;
i22 = i22 ;
i12 = mode2 ;
} else {
if ( hasDividerBeforeChildAt ( i27 ) ) {
this . mTotalLength + = this . mDividerHeight ;
}
LayoutParams layoutParams = ( LayoutParams ) virtualChildAt . getLayoutParams ( ) ;
float f2 = layoutParams . weight ;
float f3 = f + f2 ;
if ( mode2 = = 1073741824 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = = 0 & & f2 > 0 . 0f ) {
int i29 = this . mTotalLength ;
this . mTotalLength = Math . max ( i29 , ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin + i29 + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin ) ;
i18 = i24 ;
view = virtualChildAt ;
i13 = i26 ;
i17 = i22 ;
i14 = i23 ;
z5 = true ;
i11 = virtualChildCount ;
i12 = mode2 ;
i15 = i25 ;
i16 = i27 ;
} else {
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height ! = 0 | | f2 < = 0 . 0f ) {
i20 = Integer . MIN_VALUE ;
} else {
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = - 2 ;
i20 = 0 ;
}
i17 = i22 ;
i14 = i23 ;
i11 = virtualChildCount ;
i12 = mode2 ;
i15 = i25 ;
i13 = i26 ;
i16 = i27 ;
measureChildBeforeLayout ( virtualChildAt , i27 , i , 0 , i2 , f3 = = 0 . 0f ? this . mTotalLength : 0 ) ;
if ( i20 ! = Integer . MIN_VALUE ) {
( ( ViewGroup . MarginLayoutParams ) layoutParams ) . height = i20 ;
}
int measuredHeight = virtualChildAt . getMeasuredHeight ( ) ;
int i30 = this . mTotalLength ;
view = virtualChildAt ;
this . mTotalLength = Math . max ( i30 , getNextLocationOffset ( view ) + i30 + measuredHeight + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . bottomMargin ) ;
i18 = z4 ? Math . max ( measuredHeight , i24 ) : i24 ;
}
if ( i21 > = 0 & & i21 = = i16 + 1 ) {
this . mBaselineChildTop = this . mTotalLength ;
}
if ( i16 > = i21 | | layoutParams . weight < = 0 . 0f ) {
if ( mode = = 1073741824 | | ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width ! = - 1 ) {
z3 = false ;
} else {
z3 = true ;
z7 = true ;
}
int i31 = ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . rightMargin ;
int measuredWidth = view . getMeasuredWidth ( ) + i31 ;
int max = Math . max ( i14 , measuredWidth ) ;
int combineMeasuredStates = View . combineMeasuredStates ( i17 , view . getMeasuredState ( ) ) ;
z6 = z6 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams ) . width = = - 1 ;
if ( layoutParams . weight > 0 . 0f ) {
if ( ! z3 ) {
i31 = measuredWidth ;
}
i25 = Math . max ( i15 , i31 ) ;
i19 = i13 ;
} else {
if ( ! z3 ) {
i31 = measuredWidth ;
}
i19 = Math . max ( i13 , i31 ) ;
i25 = i15 ;
}
i24 = i18 ;
f = f3 ;
i26 = i19 ;
i22 = combineMeasuredStates ;
i27 = getChildrenSkipCount ( view , i16 ) + i16 ;
i23 = max ;
} else {
throw new RuntimeException ( " A child of LinearLayout with index less than mBaselineAlignedChildIndex has weight > 0, which won't work. Either remove the weight, or don't set mBaselineAlignedChildIndex. " ) ;
}
}
i27 + + ;
mode2 = i12 ;
virtualChildCount = i11 ;
} else {
int i32 = i23 ;
if ( this . mTotalLength > 0 ) {
i3 = virtualChildCount ;
if ( hasDividerBeforeChildAt ( i3 ) ) {
this . mTotalLength + = this . mDividerHeight ;
}
} else {
i3 = virtualChildCount ;
}
if ( z4 & & ( mode2 = = Integer . MIN_VALUE | | mode2 = = 0 ) ) {
this . mTotalLength = 0 ;
int i33 = 0 ;
while ( i33 < i3 ) {
View virtualChildAt2 = getVirtualChildAt ( i33 ) ;
if ( virtualChildAt2 = = null ) {
this . mTotalLength = measureNullChild ( i33 ) + this . mTotalLength ;
} else if ( virtualChildAt2 . getVisibility ( ) = = i28 ) {
i33 + = getChildrenSkipCount ( virtualChildAt2 , i33 ) ;
} else {
LayoutParams layoutParams2 = ( LayoutParams ) virtualChildAt2 . getLayoutParams ( ) ;
int i34 = this . mTotalLength ;
this . mTotalLength = Math . max ( i34 , getNextLocationOffset ( virtualChildAt2 ) + i34 + i24 + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams2 ) . bottomMargin ) ;
}
i33 + + ;
i28 = 8 ;
}
}
int paddingBottom = getPaddingBottom ( ) + getPaddingTop ( ) + this . mTotalLength ;
this . mTotalLength = paddingBottom ;
int resolveSizeAndState = View . resolveSizeAndState ( Math . max ( paddingBottom , getSuggestedMinimumHeight ( ) ) , i2 , 0 ) ;
int i35 = ( 16777215 & resolveSizeAndState ) - this . mTotalLength ;
if ( z5 | | ( i35 ! = 0 & & f > 0 . 0f ) ) {
float f4 = this . mWeightSum ;
if ( f4 > 0 . 0f ) {
f = f4 ;
}
this . mTotalLength = 0 ;
int i36 = i35 ;
int i37 = i26 ;
i5 = i22 ;
int i38 = 0 ;
while ( i38 < i3 ) {
View virtualChildAt3 = getVirtualChildAt ( i38 ) ;
if ( virtualChildAt3 . getVisibility ( ) = = 8 ) {
i7 = i36 ;
} else {
LayoutParams layoutParams3 = ( LayoutParams ) virtualChildAt3 . getLayoutParams ( ) ;
float f5 = layoutParams3 . weight ;
if ( f5 > 0 . 0f ) {
int i39 = ( int ) ( ( ( ( float ) i36 ) * f5 ) / f ) ;
float f6 = f - f5 ;
i7 = i36 - i39 ;
int childMeasureSpec = ViewGroup . getChildMeasureSpec ( i , getPaddingRight ( ) + getPaddingLeft ( ) + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . rightMargin , ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . width ) ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . height = = 0 ) {
i10 = 1073741824 ;
if ( mode2 = = 1073741824 ) {
if ( i39 < = 0 ) {
i39 = 0 ;
}
virtualChildAt3 . measure ( childMeasureSpec , View . MeasureSpec . makeMeasureSpec ( i39 , 1073741824 ) ) ;
i5 = View . combineMeasuredStates ( i5 , virtualChildAt3 . getMeasuredState ( ) & - 256 ) ;
f = f6 ;
}
} else {
i10 = 1073741824 ;
}
int measuredHeight2 = virtualChildAt3 . getMeasuredHeight ( ) + i39 ;
if ( measuredHeight2 < 0 ) {
measuredHeight2 = 0 ;
}
virtualChildAt3 . measure ( childMeasureSpec , View . MeasureSpec . makeMeasureSpec ( measuredHeight2 , i10 ) ) ;
i5 = View . combineMeasuredStates ( i5 , virtualChildAt3 . getMeasuredState ( ) & - 256 ) ;
f = f6 ;
} else {
i7 = i36 ;
}
int i40 = ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . leftMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . rightMargin ;
int measuredWidth2 = virtualChildAt3 . getMeasuredWidth ( ) + i40 ;
i32 = Math . max ( i32 , measuredWidth2 ) ;
if ( mode ! = 1073741824 ) {
i8 = i5 ;
i9 = - 1 ;
if ( ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . width = = - 1 ) {
z2 = true ;
if ( ! z2 ) {
i40 = measuredWidth2 ;
}
int max2 = Math . max ( i37 , i40 ) ;
boolean z8 = ! z6 & & ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . width = = i9 ;
int i41 = this . mTotalLength ;
this . mTotalLength = Math . max ( i41 , getNextLocationOffset ( virtualChildAt3 ) + virtualChildAt3 . getMeasuredHeight ( ) + i41 + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . bottomMargin ) ;
z6 = z8 ;
i5 = i8 ;
i37 = max2 ;
f = f ;
}
} else {
i8 = i5 ;
i9 = - 1 ;
}
z2 = false ;
if ( ! z2 ) {
}
int max2 = Math . max ( i37 , i40 ) ;
if ( ! z6 ) {
}
int i41 = this . mTotalLength ;
this . mTotalLength = Math . max ( i41 , getNextLocationOffset ( virtualChildAt3 ) + virtualChildAt3 . getMeasuredHeight ( ) + i41 + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . topMargin + ( ( ViewGroup . MarginLayoutParams ) layoutParams3 ) . bottomMargin ) ;
z6 = z8 ;
i5 = i8 ;
i37 = max2 ;
f = f ;
}
i38 + + ;
i36 = i7 ;
}
i4 = i ;
this . mTotalLength = getPaddingBottom ( ) + getPaddingTop ( ) + this . mTotalLength ;
i6 = i37 ;
} else {
i6 = Math . max ( i26 , i25 ) ;
if ( z4 & & mode2 ! = 1073741824 ) {
for ( int i42 = 0 ; i42 < i3 ; i42 + + ) {
View virtualChildAt4 = getVirtualChildAt ( i42 ) ;
if ( ! ( virtualChildAt4 = = null | | virtualChildAt4 . getVisibility ( ) = = 8 | | ( ( LayoutParams ) virtualChildAt4 . getLayoutParams ( ) ) . weight < = 0 . 0f ) ) {
virtualChildAt4 . measure ( View . MeasureSpec . makeMeasureSpec ( virtualChildAt4 . getMeasuredWidth ( ) , 1073741824 ) , View . MeasureSpec . makeMeasureSpec ( i24 , 1073741824 ) ) ;
}
}
}
i4 = i ;
i5 = i22 ;
}
if ( z6 | | mode = = 1073741824 ) {
i6 = i32 ;
}
setMeasuredDimension ( View . resolveSizeAndState ( Math . max ( getPaddingRight ( ) + getPaddingLeft ( ) + i6 , getSuggestedMinimumWidth ( ) ) , i4 , i5 ) , resolveSizeAndState ) ;
if ( z7 ) {
forceUniformWidth ( i3 , i2 ) ;
return ;
}
return ;
}
}
}
@Override // android.view.View
public void onDraw ( Canvas canvas ) {
if ( this . mDivider ! = null ) {
if ( this . mOrientation = = 1 ) {
drawDividersVertical ( canvas ) ;
} else {
drawDividersHorizontal ( canvas ) ;
}
}
}
@Override // android.view.View
public void onInitializeAccessibilityEvent ( AccessibilityEvent accessibilityEvent ) {
super . onInitializeAccessibilityEvent ( accessibilityEvent ) ;
accessibilityEvent . setClassName ( " androidx.appcompat.widget.LinearLayoutCompat " ) ;
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo ( AccessibilityNodeInfo accessibilityNodeInfo ) {
super . onInitializeAccessibilityNodeInfo ( accessibilityNodeInfo ) ;
accessibilityNodeInfo . setClassName ( " androidx.appcompat.widget.LinearLayoutCompat " ) ;
}
@Override // android.view.ViewGroup, android.view.View
public void onLayout ( boolean z2 , int i , int i2 , int i3 , int i4 ) {
if ( this . mOrientation = = 1 ) {
layoutVertical ( i , i2 , i3 , i4 ) ;
} else {
layoutHorizontal ( i , i2 , i3 , i4 ) ;
}
}
@Override // android.view.View
public void onMeasure ( int i , int i2 ) {
if ( this . mOrientation = = 1 ) {
measureVertical ( i , i2 ) ;
} else {
measureHorizontal ( i , i2 ) ;
}
}
public void setBaselineAligned ( boolean z2 ) {
this . mBaselineAligned = z2 ;
}
public void setBaselineAlignedChildIndex ( int i ) {
if ( i < 0 | | i > = getChildCount ( ) ) {
2021-07-19 19:45:22 +00:00
StringBuilder K = a . K ( " base aligned child index out of range (0, " ) ;
K . append ( getChildCount ( ) ) ;
K . append ( " ) " ) ;
throw new IllegalArgumentException ( K . toString ( ) ) ;
2021-06-27 20:44:35 +00:00
}
this . mBaselineAlignedChildIndex = i ;
}
public void setDividerDrawable ( Drawable drawable ) {
if ( drawable ! = this . mDivider ) {
this . mDivider = drawable ;
boolean z2 = false ;
if ( drawable ! = null ) {
this . mDividerWidth = drawable . getIntrinsicWidth ( ) ;
this . mDividerHeight = drawable . getIntrinsicHeight ( ) ;
} else {
this . mDividerWidth = 0 ;
this . mDividerHeight = 0 ;
}
if ( drawable = = null ) {
z2 = true ;
}
setWillNotDraw ( z2 ) ;
requestLayout ( ) ;
}
}
public void setDividerPadding ( int i ) {
this . mDividerPadding = i ;
}
public void setGravity ( int i ) {
if ( this . mGravity ! = i ) {
if ( ( 8388615 & i ) = = 0 ) {
i | = 8388611 ;
}
if ( ( i & 112 ) = = 0 ) {
i | = 48 ;
}
this . mGravity = i ;
requestLayout ( ) ;
}
}
public void setHorizontalGravity ( int i ) {
int i2 = i & 8388615 ;
int i3 = this . mGravity ;
if ( ( 8388615 & i3 ) ! = i2 ) {
this . mGravity = i2 | ( - 8388616 & i3 ) ;
requestLayout ( ) ;
}
}
public void setMeasureWithLargestChildEnabled ( boolean z2 ) {
this . mUseLargestChild = z2 ;
}
public void setOrientation ( int i ) {
if ( this . mOrientation ! = i ) {
this . mOrientation = i ;
requestLayout ( ) ;
}
}
public void setShowDividers ( int i ) {
if ( i ! = this . mShowDividers ) {
requestLayout ( ) ;
}
this . mShowDividers = i ;
}
public void setVerticalGravity ( int i ) {
int i2 = i & 112 ;
int i3 = this . mGravity ;
if ( ( i3 & 112 ) ! = i2 ) {
this . mGravity = i2 | ( i3 & - 113 ) ;
requestLayout ( ) ;
}
}
public void setWeightSum ( float f ) {
this . mWeightSum = Math . max ( 0 . 0f , f ) ;
}
@Override // android.view.ViewGroup
public boolean shouldDelayChildPressedState ( ) {
return false ;
}
}