what-the-bank/sources/androidx/constraintlayout/helper/widget/Flow.java

336 lines
15 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package androidx.constraintlayout.helper.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.VirtualLayout;
import o.C17026tNn;
import o.C3345avm;
import o.NsV;
import o.ZXE;
import o.gQG;
import o.yqQ;
/* loaded from: classes.dex */
public class Flow extends VirtualLayout {
private gQG a;
public Flow(Context context) {
super(context);
}
public Flow(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public Flow(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@Override // androidx.constraintlayout.widget.ConstraintHelper, android.view.View
public void onMeasure(int i, int i2) {
d(this.a, i, i2);
}
@Override // androidx.constraintlayout.widget.VirtualLayout
public final void d(ZXE zxe, int i, int i2) {
int mode = View.MeasureSpec.getMode(i);
int size = View.MeasureSpec.getSize(i);
int mode2 = View.MeasureSpec.getMode(i2);
int size2 = View.MeasureSpec.getSize(i2);
if (zxe != null) {
zxe.c(mode, size, mode2, size2);
setMeasuredDimension(zxe.aC, zxe.aE);
} else {
setMeasuredDimension(0, 0);
}
}
@Override // androidx.constraintlayout.widget.ConstraintHelper
public final void le_(yqQ.Sts sts, NsV nsV, ConstraintLayout.Sts sts2, SparseArray<C17026tNn> sparseArray) {
super.le_(sts, nsV, sts2, sparseArray);
if (nsV instanceof gQG) {
gQG gqg = (gQG) nsV;
if (sts2.U != -1) {
gqg.av = sts2.U;
}
}
}
@Override // androidx.constraintlayout.widget.VirtualLayout, androidx.constraintlayout.widget.ConstraintHelper
public final void lt_(AttributeSet attributeSet) {
super.lt_(attributeSet);
this.a = new gQG();
if (attributeSet != null) {
TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, C3345avm.IeS.ConstraintLayout_Layout);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i = 0; i < indexCount; i++) {
int index = obtainStyledAttributes.getIndex(i);
if (index != C3345avm.IeS.ConstraintLayout_Layout_android_orientation) {
if (index == C3345avm.IeS.ConstraintLayout_Layout_android_padding) {
gQG gqg = this.a;
int dimensionPixelSize = obtainStyledAttributes.getDimensionPixelSize(index, 0);
((ZXE) gqg).aH = dimensionPixelSize;
((ZXE) gqg).aP = dimensionPixelSize;
((ZXE) gqg).aI = dimensionPixelSize;
((ZXE) gqg).aJ = dimensionPixelSize;
((ZXE) gqg).aK = dimensionPixelSize;
((ZXE) gqg).aL = dimensionPixelSize;
} else if (index == C3345avm.IeS.ConstraintLayout_Layout_android_paddingStart) {
gQG gqg2 = this.a;
int dimensionPixelSize2 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
((ZXE) gqg2).aK = dimensionPixelSize2;
((ZXE) gqg2).aQ = dimensionPixelSize2;
((ZXE) gqg2).aN = dimensionPixelSize2;
} else if (index != C3345avm.IeS.ConstraintLayout_Layout_android_paddingEnd) {
if (index == C3345avm.IeS.ConstraintLayout_Layout_android_paddingLeft) {
gQG gqg3 = this.a;
int dimensionPixelSize3 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
((ZXE) gqg3).aH = dimensionPixelSize3;
((ZXE) gqg3).aQ = dimensionPixelSize3;
} else if (index != C3345avm.IeS.ConstraintLayout_Layout_android_paddingTop) {
if (index == C3345avm.IeS.ConstraintLayout_Layout_android_paddingRight) {
gQG gqg4 = this.a;
int dimensionPixelSize4 = obtainStyledAttributes.getDimensionPixelSize(index, 0);
((ZXE) gqg4).aI = dimensionPixelSize4;
((ZXE) gqg4).aN = dimensionPixelSize4;
} else if (index != C3345avm.IeS.ConstraintLayout_Layout_android_paddingBottom) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_wrapMode) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_horizontalStyle) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_verticalStyle) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_firstHorizontalStyle) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_lastHorizontalStyle) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_firstVerticalStyle) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_lastVerticalStyle) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_horizontalBias) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_firstHorizontalBias) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_lastHorizontalBias) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_firstVerticalBias) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_lastVerticalBias) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_verticalBias) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_horizontalAlign) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_verticalAlign) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_horizontalGap) {
if (index != C3345avm.IeS.ConstraintLayout_Layout_flow_verticalGap) {
if (index == C3345avm.IeS.ConstraintLayout_Layout_flow_maxElementsWrap) {
this.a.au = obtainStyledAttributes.getInt(index, -1);
}
} else {
this.a.ay = obtainStyledAttributes.getDimensionPixelSize(index, 0);
}
} else {
this.a.an = obtainStyledAttributes.getDimensionPixelSize(index, 0);
}
} else {
this.a.ax = obtainStyledAttributes.getInt(index, 2);
}
} else {
this.a.ar = obtainStyledAttributes.getInt(index, 2);
}
} else {
this.a.az = obtainStyledAttributes.getFloat(index, 0.5f);
}
} else {
this.a.aw = obtainStyledAttributes.getFloat(index, 0.5f);
}
} else {
this.a.ai = obtainStyledAttributes.getFloat(index, 0.5f);
}
} else {
this.a.aq = obtainStyledAttributes.getFloat(index, 0.5f);
}
} else {
this.a.e = obtainStyledAttributes.getFloat(index, 0.5f);
}
} else {
this.a.ao = obtainStyledAttributes.getFloat(index, 0.5f);
}
} else {
this.a.at = obtainStyledAttributes.getInt(index, 0);
}
} else {
this.a.am = obtainStyledAttributes.getInt(index, 0);
}
} else {
this.a.as = obtainStyledAttributes.getInt(index, 0);
}
} else {
this.a.aj = obtainStyledAttributes.getInt(index, 0);
}
} else {
this.a.aA = obtainStyledAttributes.getInt(index, 0);
}
} else {
this.a.ap = obtainStyledAttributes.getInt(index, 0);
}
} else {
this.a.aB = obtainStyledAttributes.getInt(index, 0);
}
} else {
((ZXE) this.a).aJ = obtainStyledAttributes.getDimensionPixelSize(index, 0);
}
} else {
((ZXE) this.a).aP = obtainStyledAttributes.getDimensionPixelSize(index, 0);
}
} else {
((ZXE) this.a).aL = obtainStyledAttributes.getDimensionPixelSize(index, 0);
}
} else {
this.a.av = obtainStyledAttributes.getInt(index, 0);
}
}
obtainStyledAttributes.recycle();
}
this.b = this.a;
d();
}
@Override // androidx.constraintlayout.widget.ConstraintHelper
public final void e(C17026tNn c17026tNn, boolean z) {
gQG gqg = this.a;
int i = ((ZXE) gqg).aK;
if (i > 0 || ((ZXE) gqg).aL > 0) {
if (z) {
((ZXE) gqg).aQ = ((ZXE) gqg).aL;
((ZXE) gqg).aN = i;
} else {
((ZXE) gqg).aQ = i;
((ZXE) gqg).aN = ((ZXE) gqg).aL;
}
}
}
public void setFirstHorizontalBias(float f) {
this.a.e = f;
requestLayout();
}
public void setFirstHorizontalStyle(int i) {
this.a.aj = i;
requestLayout();
}
public void setFirstVerticalBias(float f) {
this.a.ai = f;
requestLayout();
}
public void setFirstVerticalStyle(int i) {
this.a.am = i;
requestLayout();
}
public void setHorizontalAlign(int i) {
this.a.ar = i;
requestLayout();
}
public void setHorizontalBias(float f) {
this.a.ao = f;
requestLayout();
}
public void setHorizontalGap(int i) {
this.a.an = i;
requestLayout();
}
public void setHorizontalStyle(int i) {
this.a.ap = i;
requestLayout();
}
public void setLastHorizontalBias(float f) {
this.a.aq = f;
requestLayout();
}
public void setLastHorizontalStyle(int i) {
this.a.as = i;
requestLayout();
}
public void setLastVerticalBias(float f) {
this.a.aw = f;
requestLayout();
}
public void setLastVerticalStyle(int i) {
this.a.at = i;
requestLayout();
}
public void setMaxElementsWrap(int i) {
this.a.au = i;
requestLayout();
}
public void setOrientation(int i) {
this.a.av = i;
requestLayout();
}
public void setPadding(int i) {
gQG gqg = this.a;
((ZXE) gqg).aH = i;
((ZXE) gqg).aP = i;
((ZXE) gqg).aI = i;
((ZXE) gqg).aJ = i;
((ZXE) gqg).aK = i;
((ZXE) gqg).aL = i;
requestLayout();
}
public void setPaddingBottom(int i) {
((ZXE) this.a).aJ = i;
requestLayout();
}
public void setPaddingLeft(int i) {
gQG gqg = this.a;
((ZXE) gqg).aH = i;
((ZXE) gqg).aQ = i;
requestLayout();
}
public void setPaddingRight(int i) {
gQG gqg = this.a;
((ZXE) gqg).aI = i;
((ZXE) gqg).aN = i;
requestLayout();
}
public void setPaddingTop(int i) {
((ZXE) this.a).aP = i;
requestLayout();
}
public void setVerticalAlign(int i) {
this.a.ax = i;
requestLayout();
}
public void setVerticalBias(float f) {
this.a.az = f;
requestLayout();
}
public void setVerticalGap(int i) {
this.a.ay = i;
requestLayout();
}
public void setVerticalStyle(int i) {
this.a.aA = i;
requestLayout();
}
public void setWrapMode(int i) {
this.a.aB = i;
requestLayout();
}
}