alexandroid/decompiled/jadx/sources/androidx/constraintlayout/widget/ConstraintLayout.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

1984 lines
93 KiB
Java

package androidx.constraintlayout.widget;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.core.Metrics;
import androidx.constraintlayout.core.widgets.ConstraintAnchor;
import androidx.constraintlayout.core.widgets.ConstraintWidget;
import androidx.constraintlayout.core.widgets.ConstraintWidgetContainer;
import androidx.constraintlayout.core.widgets.analyzer.BasicMeasure;
import androidx.core.view.ViewCompat;
import com.amazon.alexa.routing.api.RouteParameter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes13.dex */
public class ConstraintLayout extends ViewGroup {
private static final boolean DEBUG = false;
private static final boolean DEBUG_DRAW_CONSTRAINTS = false;
public static final int DESIGN_INFO_ID = 0;
private static final boolean OPTIMIZE_HEIGHT_CHANGE = false;
private static final String TAG = "ConstraintLayout";
private static final boolean USE_CONSTRAINTS_HELPER = true;
public static final String VERSION = "ConstraintLayout-2.2.0-alpha04";
private static SharedValues sSharedValues;
SparseArray<View> mChildrenByIds;
private ArrayList<ConstraintHelper> mConstraintHelpers;
protected ConstraintLayoutStates mConstraintLayoutSpec;
private ConstraintSet mConstraintSet;
private int mConstraintSetId;
private HashMap<String, Integer> mDesignIds;
protected boolean mDirtyHierarchy;
private int mLastMeasureHeight;
int mLastMeasureHeightMode;
int mLastMeasureHeightSize;
private int mLastMeasureWidth;
int mLastMeasureWidthMode;
int mLastMeasureWidthSize;
protected ConstraintWidgetContainer mLayoutWidget;
private int mMaxHeight;
private int mMaxWidth;
Measurer mMeasurer;
private Metrics mMetrics;
private int mMinHeight;
private int mMinWidth;
private ArrayList<ValueModifier> mModifiers;
private int mOnMeasureHeightMeasureSpec;
private int mOnMeasureWidthMeasureSpec;
private int mOptimizationLevel;
private SparseArray<ConstraintWidget> mTempMapIdToWidget;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* renamed from: androidx.constraintlayout.widget.ConstraintLayout$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$androidx$constraintlayout$core$widgets$ConstraintWidget$DimensionBehaviour;
static {
int[] iArr = new int[ConstraintWidget.DimensionBehaviour.values().length];
$SwitchMap$androidx$constraintlayout$core$widgets$ConstraintWidget$DimensionBehaviour = iArr;
try {
iArr[ConstraintWidget.DimensionBehaviour.FIXED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$androidx$constraintlayout$core$widgets$ConstraintWidget$DimensionBehaviour[ConstraintWidget.DimensionBehaviour.WRAP_CONTENT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$androidx$constraintlayout$core$widgets$ConstraintWidget$DimensionBehaviour[ConstraintWidget.DimensionBehaviour.MATCH_PARENT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$androidx$constraintlayout$core$widgets$ConstraintWidget$DimensionBehaviour[ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public class Measurer implements BasicMeasure.Measurer {
ConstraintLayout mLayout;
int mLayoutHeightSpec;
int mLayoutWidthSpec;
int mPaddingBottom;
int mPaddingHeight;
int mPaddingTop;
int mPaddingWidth;
public Measurer(ConstraintLayout constraintLayout) {
this.mLayout = constraintLayout;
}
private boolean isSimilarSpec(int i, int i2, int i3) {
if (i == i2) {
return true;
}
int mode = View.MeasureSpec.getMode(i);
int mode2 = View.MeasureSpec.getMode(i2);
int size = View.MeasureSpec.getSize(i2);
if (mode2 == 1073741824) {
return (mode == Integer.MIN_VALUE || mode == 0) && i3 == size;
}
return false;
}
public void captureLayoutInfo(int i, int i2, int i3, int i4, int i5, int i6) {
this.mPaddingTop = i3;
this.mPaddingBottom = i4;
this.mPaddingWidth = i5;
this.mPaddingHeight = i6;
this.mLayoutWidthSpec = i;
this.mLayoutHeightSpec = i2;
}
@Override // androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.Measurer
public final void didMeasures() {
ConstraintLayout constraintLayout;
int childCount = this.mLayout.getChildCount();
int i = 0;
while (true) {
constraintLayout = this.mLayout;
if (i >= childCount) {
break;
}
View childAt = constraintLayout.getChildAt(i);
if (childAt instanceof Placeholder) {
((Placeholder) childAt).updatePostMeasure(this.mLayout);
}
i++;
}
int size = constraintLayout.mConstraintHelpers.size();
if (size > 0) {
for (int i2 = 0; i2 < size; i2++) {
((ConstraintHelper) this.mLayout.mConstraintHelpers.get(i2)).updatePostMeasure(this.mLayout);
}
}
}
/* JADX WARN: Removed duplicated region for block: B:155:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:160:0x01d6 */
/* JADX WARN: Removed duplicated region for block: B:161:0x01d1 */
/* JADX WARN: Removed duplicated region for block: B:186:0x0148 */
/* JADX WARN: Removed duplicated region for block: B:26:0x00de */
/* JADX WARN: Removed duplicated region for block: B:57:0x01cf */
/* JADX WARN: Removed duplicated region for block: B:59:0x01d4 */
/* JADX WARN: Removed duplicated region for block: B:79:0x0208 */
@Override // androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.Measurer
@android.annotation.SuppressLint({"WrongCall"})
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void measure(androidx.constraintlayout.core.widgets.ConstraintWidget r22, androidx.constraintlayout.core.widgets.analyzer.BasicMeasure.Measure r23) {
/*
Method dump skipped, instructions count: 793
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.Measurer.measure(androidx.constraintlayout.core.widgets.ConstraintWidget, androidx.constraintlayout.core.widgets.analyzer.BasicMeasure$Measure):void");
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public interface ValueModifier {
boolean update(int i, int i2, int i3, View view, LayoutParams layoutParams);
}
public ConstraintLayout(@NonNull Context context) {
super(context);
this.mChildrenByIds = new SparseArray<>();
this.mConstraintHelpers = new ArrayList<>(4);
this.mLayoutWidget = new ConstraintWidgetContainer();
this.mMinWidth = 0;
this.mMinHeight = 0;
this.mMaxWidth = Integer.MAX_VALUE;
this.mMaxHeight = Integer.MAX_VALUE;
this.mDirtyHierarchy = true;
this.mOptimizationLevel = 257;
this.mConstraintSet = null;
this.mConstraintLayoutSpec = null;
this.mConstraintSetId = -1;
this.mDesignIds = new HashMap<>();
this.mLastMeasureWidth = -1;
this.mLastMeasureHeight = -1;
this.mLastMeasureWidthSize = -1;
this.mLastMeasureHeightSize = -1;
this.mLastMeasureWidthMode = 0;
this.mLastMeasureHeightMode = 0;
this.mTempMapIdToWidget = new SparseArray<>();
this.mMeasurer = new Measurer(this);
this.mOnMeasureWidthMeasureSpec = 0;
this.mOnMeasureHeightMeasureSpec = 0;
init(null, 0, 0);
}
private int getPaddingWidth() {
int max = Math.max(0, getPaddingRight()) + Math.max(0, getPaddingLeft());
int max2 = Math.max(0, getPaddingEnd()) + Math.max(0, getPaddingStart());
return max2 > 0 ? max2 : max;
}
public static SharedValues getSharedValues() {
if (sSharedValues == null) {
sSharedValues = new SharedValues();
}
return sSharedValues;
}
private ConstraintWidget getTargetWidget(int i) {
if (i == 0) {
return this.mLayoutWidget;
}
View view = this.mChildrenByIds.get(i);
if (view == null && (view = findViewById(i)) != null && view != this && view.getParent() == this) {
onViewAdded(view);
}
if (view == this) {
return this.mLayoutWidget;
}
if (view == null) {
return null;
}
return ((LayoutParams) view.getLayoutParams()).mWidget;
}
private void init(AttributeSet attributeSet, int i, int i2) {
this.mLayoutWidget.setCompanionWidget(this);
this.mLayoutWidget.setMeasurer(this.mMeasurer);
this.mChildrenByIds.put(getId(), this);
this.mConstraintSet = null;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, R.styleable.ConstraintLayout_Layout, i, i2);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i3 = 0; i3 < indexCount; i3++) {
int index = obtainStyledAttributes.getIndex(i3);
if (index == R.styleable.ConstraintLayout_Layout_android_minWidth) {
this.mMinWidth = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMinWidth);
} else if (index == R.styleable.ConstraintLayout_Layout_android_minHeight) {
this.mMinHeight = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMinHeight);
} else if (index == R.styleable.ConstraintLayout_Layout_android_maxWidth) {
this.mMaxWidth = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMaxWidth);
} else if (index == R.styleable.ConstraintLayout_Layout_android_maxHeight) {
this.mMaxHeight = obtainStyledAttributes.getDimensionPixelOffset(index, this.mMaxHeight);
} else if (index == R.styleable.ConstraintLayout_Layout_layout_optimizationLevel) {
this.mOptimizationLevel = obtainStyledAttributes.getInt(index, this.mOptimizationLevel);
} else if (index == R.styleable.ConstraintLayout_Layout_layoutDescription) {
int resourceId = obtainStyledAttributes.getResourceId(index, 0);
if (resourceId != 0) {
try {
parseLayoutDescription(resourceId);
} catch (Resources.NotFoundException unused) {
this.mConstraintLayoutSpec = null;
}
}
} else if (index == R.styleable.ConstraintLayout_Layout_constraintSet) {
int resourceId2 = obtainStyledAttributes.getResourceId(index, 0);
try {
ConstraintSet constraintSet = new ConstraintSet();
this.mConstraintSet = constraintSet;
constraintSet.load(getContext(), resourceId2);
} catch (Resources.NotFoundException unused2) {
this.mConstraintSet = null;
}
this.mConstraintSetId = resourceId2;
}
}
obtainStyledAttributes.recycle();
}
this.mLayoutWidget.setOptimizationLevel(this.mOptimizationLevel);
}
private void markHierarchyDirty() {
this.mDirtyHierarchy = true;
this.mLastMeasureWidth = -1;
this.mLastMeasureHeight = -1;
this.mLastMeasureWidthSize = -1;
this.mLastMeasureHeightSize = -1;
this.mLastMeasureWidthMode = 0;
this.mLastMeasureHeightMode = 0;
}
private void setChildrenConstraints() {
ConstraintLayout constraintLayout;
boolean isInEditMode = isInEditMode();
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
ConstraintWidget viewWidget = getViewWidget(getChildAt(i));
if (viewWidget != null) {
viewWidget.reset();
}
}
if (isInEditMode) {
for (int i2 = 0; i2 < childCount; i2++) {
View childAt = getChildAt(i2);
try {
String resourceName = getResources().getResourceName(childAt.getId());
setDesignInformation(0, resourceName, Integer.valueOf(childAt.getId()));
int indexOf = resourceName.indexOf(47);
if (indexOf != -1) {
resourceName = resourceName.substring(indexOf + 1);
}
getTargetWidget(childAt.getId()).setDebugName(resourceName);
} catch (Resources.NotFoundException unused) {
}
}
}
if (this.mConstraintSetId != -1) {
for (int i3 = 0; i3 < childCount; i3++) {
View childAt2 = getChildAt(i3);
if (childAt2.getId() == this.mConstraintSetId && (childAt2 instanceof Constraints)) {
this.mConstraintSet = ((Constraints) childAt2).getConstraintSet();
}
}
}
ConstraintSet constraintSet = this.mConstraintSet;
if (constraintSet != null) {
constraintSet.applyToInternal(this, true);
}
this.mLayoutWidget.removeAllChildren();
int size = this.mConstraintHelpers.size();
if (size > 0) {
for (int i4 = 0; i4 < size; i4++) {
this.mConstraintHelpers.get(i4).updatePreLayout(this);
}
}
for (int i5 = 0; i5 < childCount; i5++) {
View childAt3 = getChildAt(i5);
if (childAt3 instanceof Placeholder) {
((Placeholder) childAt3).updatePreLayout(this);
}
}
this.mTempMapIdToWidget.clear();
this.mTempMapIdToWidget.put(0, this.mLayoutWidget);
this.mTempMapIdToWidget.put(getId(), this.mLayoutWidget);
for (int i6 = 0; i6 < childCount; i6++) {
View childAt4 = getChildAt(i6);
this.mTempMapIdToWidget.put(childAt4.getId(), getViewWidget(childAt4));
}
int i7 = 0;
while (i7 < childCount) {
View childAt5 = this.getChildAt(i7);
ConstraintWidget viewWidget2 = this.getViewWidget(childAt5);
if (viewWidget2 == null) {
constraintLayout = this;
} else {
LayoutParams layoutParams = (LayoutParams) childAt5.getLayoutParams();
this.mLayoutWidget.add(viewWidget2);
constraintLayout = this;
constraintLayout.applyConstraintsFromLayoutParams(isInEditMode, childAt5, viewWidget2, layoutParams, this.mTempMapIdToWidget);
}
i7++;
this = constraintLayout;
}
}
private void setWidgetBaseline(ConstraintWidget constraintWidget, LayoutParams layoutParams, SparseArray<ConstraintWidget> sparseArray, int i, ConstraintAnchor.Type type) {
View view = this.mChildrenByIds.get(i);
ConstraintWidget constraintWidget2 = sparseArray.get(i);
if (constraintWidget2 == null || view == null || !(view.getLayoutParams() instanceof LayoutParams)) {
return;
}
layoutParams.mNeedsBaseline = true;
ConstraintAnchor.Type type2 = ConstraintAnchor.Type.BASELINE;
if (type == type2) {
LayoutParams layoutParams2 = (LayoutParams) view.getLayoutParams();
layoutParams2.mNeedsBaseline = true;
layoutParams2.mWidget.setHasBaseline(true);
}
constraintWidget.getAnchor(type2).connect(constraintWidget2.getAnchor(type), layoutParams.baselineMargin, layoutParams.goneBaselineMargin, true);
constraintWidget.setHasBaseline(true);
constraintWidget.getAnchor(ConstraintAnchor.Type.TOP).reset();
constraintWidget.getAnchor(ConstraintAnchor.Type.BOTTOM).reset();
}
private boolean updateHierarchy() {
int childCount = getChildCount();
boolean z = false;
int i = 0;
while (true) {
if (i >= childCount) {
break;
}
if (getChildAt(i).isLayoutRequested()) {
z = true;
break;
}
i++;
}
if (z) {
setChildrenConstraints();
}
return z;
}
public void addValueModifier(ValueModifier valueModifier) {
if (this.mModifiers == null) {
this.mModifiers = new ArrayList<>();
}
this.mModifiers.add(valueModifier);
}
/* JADX WARN: Removed duplicated region for block: B:85:0x0174 */
/* JADX WARN: Removed duplicated region for block: B:88:0x017d */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void applyConstraintsFromLayoutParams(boolean r15, android.view.View r16, androidx.constraintlayout.core.widgets.ConstraintWidget r17, androidx.constraintlayout.widget.ConstraintLayout.LayoutParams r18, android.util.SparseArray<androidx.constraintlayout.core.widgets.ConstraintWidget> r19) {
/*
Method dump skipped, instructions count: 597
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.applyConstraintsFromLayoutParams(boolean, android.view.View, androidx.constraintlayout.core.widgets.ConstraintWidget, androidx.constraintlayout.widget.ConstraintLayout$LayoutParams, android.util.SparseArray):void");
}
@Override // android.view.ViewGroup
public boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
return layoutParams instanceof LayoutParams;
}
@Override // android.view.ViewGroup, android.view.View
public void dispatchDraw(Canvas canvas) {
Object tag;
int size;
ArrayList<ConstraintHelper> arrayList = this.mConstraintHelpers;
if (arrayList != null && (size = arrayList.size()) > 0) {
for (int i = 0; i < size; i++) {
this.mConstraintHelpers.get(i).updatePreDraw(this);
}
}
super.dispatchDraw(canvas);
if (isInEditMode()) {
float width = getWidth();
float height = getHeight();
int childCount = getChildCount();
for (int i2 = 0; i2 < childCount; i2++) {
View childAt = getChildAt(i2);
if (childAt.getVisibility() != 8 && (tag = childAt.getTag()) != null && (tag instanceof String)) {
String[] split = ((String) tag).split(",");
if (split.length == 4) {
int parseInt = Integer.parseInt(split[0]);
int parseInt2 = Integer.parseInt(split[1]);
int parseInt3 = Integer.parseInt(split[2]);
int i3 = (int) ((parseInt / 1080.0f) * width);
int i4 = (int) ((parseInt2 / 1920.0f) * height);
Paint paint = new Paint();
paint.setColor(-65536);
float f = i3;
float f2 = i4;
float f3 = i3 + ((int) ((parseInt3 / 1080.0f) * width));
canvas.drawLine(f, f2, f3, f2, paint);
float parseInt4 = i4 + ((int) ((Integer.parseInt(split[3]) / 1920.0f) * height));
canvas.drawLine(f3, f2, f3, parseInt4, paint);
canvas.drawLine(f3, parseInt4, f, parseInt4, paint);
canvas.drawLine(f, parseInt4, f, f2, paint);
paint.setColor(-16711936);
canvas.drawLine(f, f2, f3, parseInt4, paint);
canvas.drawLine(f, parseInt4, f3, f2, paint);
}
}
}
}
}
public boolean dynamicUpdateConstraints(int i, int i2) {
boolean z = false;
if (this.mModifiers == null) {
return false;
}
int size = View.MeasureSpec.getSize(i);
int size2 = View.MeasureSpec.getSize(i2);
Iterator<ValueModifier> it2 = this.mModifiers.iterator();
while (it2.hasNext()) {
ValueModifier next = it2.next();
Iterator<ConstraintWidget> it3 = this.mLayoutWidget.getChildren().iterator();
while (it3.hasNext()) {
View view = (View) it3.next().getCompanionWidget();
z |= next.update(size, size2, view.getId(), view, (LayoutParams) view.getLayoutParams());
}
}
return z;
}
public void fillMetrics(Metrics metrics) {
this.mMetrics = metrics;
this.mLayoutWidget.fillMetrics(metrics);
}
@Override // android.view.View
public void forceLayout() {
markHierarchyDirty();
super.forceLayout();
}
@Override // android.view.ViewGroup
public LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(-2, -2);
}
@Override // android.view.ViewGroup
public LayoutParams generateLayoutParams(AttributeSet attributeSet) {
return new LayoutParams(getContext(), attributeSet);
}
public Object getDesignInformation(int i, Object obj) {
if (i != 0 || !(obj instanceof String)) {
return null;
}
String str = (String) obj;
HashMap<String, Integer> hashMap = this.mDesignIds;
if (hashMap == null || !hashMap.containsKey(str)) {
return null;
}
return this.mDesignIds.get(str);
}
public int getMaxHeight() {
return this.mMaxHeight;
}
public int getMaxWidth() {
return this.mMaxWidth;
}
public int getMinHeight() {
return this.mMinHeight;
}
public int getMinWidth() {
return this.mMinWidth;
}
public int getOptimizationLevel() {
return this.mLayoutWidget.getOptimizationLevel();
}
public String getSceneString() {
int id;
StringBuilder sb = new StringBuilder();
if (this.mLayoutWidget.stringId == null) {
int id2 = getId();
if (id2 != -1) {
this.mLayoutWidget.stringId = getContext().getResources().getResourceEntryName(id2);
} else {
this.mLayoutWidget.stringId = RouteParameter.PARENT;
}
}
if (this.mLayoutWidget.getDebugName() == null) {
ConstraintWidgetContainer constraintWidgetContainer = this.mLayoutWidget;
constraintWidgetContainer.setDebugName(constraintWidgetContainer.stringId);
this.mLayoutWidget.getDebugName();
}
Iterator<ConstraintWidget> it2 = this.mLayoutWidget.getChildren().iterator();
while (it2.hasNext()) {
ConstraintWidget next = it2.next();
View view = (View) next.getCompanionWidget();
if (view != null) {
if (next.stringId == null && (id = view.getId()) != -1) {
next.stringId = getContext().getResources().getResourceEntryName(id);
}
if (next.getDebugName() == null) {
next.setDebugName(next.stringId);
next.getDebugName();
}
}
}
this.mLayoutWidget.getSceneString(sb);
return sb.toString();
}
public View getViewById(int i) {
return this.mChildrenByIds.get(i);
}
public final ConstraintWidget getViewWidget(View view) {
if (view == this) {
return this.mLayoutWidget;
}
if (view == null) {
return null;
}
if (view.getLayoutParams() instanceof LayoutParams) {
return ((LayoutParams) view.getLayoutParams()).mWidget;
}
view.setLayoutParams(generateLayoutParams(view.getLayoutParams()));
if (view.getLayoutParams() instanceof LayoutParams) {
return ((LayoutParams) view.getLayoutParams()).mWidget;
}
return null;
}
public boolean isRtl() {
return (getContext().getApplicationInfo().flags & 4194304) != 0 && 1 == getLayoutDirection();
}
public void loadLayoutDescription(int i) {
if (i == 0) {
this.mConstraintLayoutSpec = null;
return;
}
try {
this.mConstraintLayoutSpec = new ConstraintLayoutStates(getContext(), this, i);
} catch (Resources.NotFoundException unused) {
this.mConstraintLayoutSpec = null;
}
}
@Override // android.view.ViewGroup, android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
View content;
Metrics metrics = this.mMetrics;
if (metrics != null) {
metrics.mNumberOfLayouts++;
}
int childCount = getChildCount();
boolean isInEditMode = isInEditMode();
for (int i5 = 0; i5 < childCount; i5++) {
View childAt = getChildAt(i5);
LayoutParams layoutParams = (LayoutParams) childAt.getLayoutParams();
ConstraintWidget constraintWidget = layoutParams.mWidget;
if ((childAt.getVisibility() != 8 || layoutParams.mIsGuideline || layoutParams.mIsHelper || layoutParams.mIsVirtualGroup || isInEditMode) && !layoutParams.mIsInPlaceholder) {
int x = constraintWidget.getX();
int y = constraintWidget.getY();
int width = constraintWidget.getWidth() + x;
int height = constraintWidget.getHeight() + y;
childAt.layout(x, y, width, height);
if ((childAt instanceof Placeholder) && (content = ((Placeholder) childAt).getContent()) != null) {
content.setVisibility(0);
content.layout(x, y, width, height);
}
}
}
int size = this.mConstraintHelpers.size();
if (size > 0) {
for (int i6 = 0; i6 < size; i6++) {
this.mConstraintHelpers.get(i6).updatePostLayout(this);
}
}
}
@Override // android.view.View
public void onMeasure(int i, int i2) {
long j;
if (this.mMetrics != null) {
j = System.nanoTime();
this.mMetrics.mChildCount = getChildCount();
this.mMetrics.mMeasureCalls++;
} else {
j = 0;
}
boolean dynamicUpdateConstraints = this.mDirtyHierarchy | dynamicUpdateConstraints(i, i2);
this.mDirtyHierarchy = dynamicUpdateConstraints;
if (!dynamicUpdateConstraints) {
int childCount = getChildCount();
int i3 = 0;
while (true) {
if (i3 >= childCount) {
break;
}
if (getChildAt(i3).isLayoutRequested()) {
this.mDirtyHierarchy = true;
break;
}
i3++;
}
}
this.mOnMeasureWidthMeasureSpec = i;
this.mOnMeasureHeightMeasureSpec = i2;
this.mLayoutWidget.setRtl(isRtl());
if (this.mDirtyHierarchy) {
this.mDirtyHierarchy = false;
if (updateHierarchy()) {
this.mLayoutWidget.updateHierarchy();
}
}
this.mLayoutWidget.fillMetrics(this.mMetrics);
resolveSystem(this.mLayoutWidget, this.mOptimizationLevel, i, i2);
resolveMeasuredDimension(i, i2, this.mLayoutWidget.getWidth(), this.mLayoutWidget.getHeight(), this.mLayoutWidget.isWidthMeasuredTooSmall(), this.mLayoutWidget.isHeightMeasuredTooSmall());
Metrics metrics = this.mMetrics;
if (metrics != null) {
metrics.mMeasureDuration = (System.nanoTime() - j) + metrics.mMeasureDuration;
}
}
@Override // android.view.ViewGroup
public void onViewAdded(View view) {
super.onViewAdded(view);
ConstraintWidget viewWidget = getViewWidget(view);
if ((view instanceof Guideline) && !(viewWidget instanceof androidx.constraintlayout.core.widgets.Guideline)) {
LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
androidx.constraintlayout.core.widgets.Guideline guideline = new androidx.constraintlayout.core.widgets.Guideline();
layoutParams.mWidget = guideline;
layoutParams.mIsGuideline = true;
guideline.setOrientation(layoutParams.orientation);
}
if (view instanceof ConstraintHelper) {
ConstraintHelper constraintHelper = (ConstraintHelper) view;
constraintHelper.validateParams();
((LayoutParams) view.getLayoutParams()).mIsHelper = true;
if (!this.mConstraintHelpers.contains(constraintHelper)) {
this.mConstraintHelpers.add(constraintHelper);
}
}
this.mChildrenByIds.put(view.getId(), view);
this.mDirtyHierarchy = true;
}
@Override // android.view.ViewGroup
public void onViewRemoved(View view) {
super.onViewRemoved(view);
this.mChildrenByIds.remove(view.getId());
this.mLayoutWidget.remove(getViewWidget(view));
this.mConstraintHelpers.remove(view);
this.mDirtyHierarchy = true;
}
public void parseLayoutDescription(int i) {
this.mConstraintLayoutSpec = new ConstraintLayoutStates(getContext(), this, i);
}
public void removeValueModifier(ValueModifier valueModifier) {
if (valueModifier == null) {
return;
}
this.mModifiers.remove(valueModifier);
}
@Override // android.view.View, android.view.ViewParent
public void requestLayout() {
markHierarchyDirty();
super.requestLayout();
}
public void resolveMeasuredDimension(int i, int i2, int i3, int i4, boolean z, boolean z2) {
Measurer measurer = this.mMeasurer;
int i5 = measurer.mPaddingHeight;
int resolveSizeAndState = View.resolveSizeAndState(i3 + measurer.mPaddingWidth, i, 0);
int resolveSizeAndState2 = View.resolveSizeAndState(i4 + i5, i2, 0);
int i6 = resolveSizeAndState & ViewCompat.MEASURED_SIZE_MASK;
int i7 = resolveSizeAndState2 & ViewCompat.MEASURED_SIZE_MASK;
int min = Math.min(this.mMaxWidth, i6);
int min2 = Math.min(this.mMaxHeight, i7);
if (z) {
min |= 16777216;
}
if (z2) {
min2 |= 16777216;
}
setMeasuredDimension(min, min2);
this.mLastMeasureWidth = min;
this.mLastMeasureHeight = min2;
}
public void resolveSystem(ConstraintWidgetContainer constraintWidgetContainer, int i, int i2, int i3) {
int i4;
int mode = View.MeasureSpec.getMode(i2);
int size = View.MeasureSpec.getSize(i2);
int mode2 = View.MeasureSpec.getMode(i3);
int size2 = View.MeasureSpec.getSize(i3);
int max = Math.max(0, getPaddingTop());
int max2 = Math.max(0, getPaddingBottom());
int i5 = max + max2;
int paddingWidth = getPaddingWidth();
this.mMeasurer.captureLayoutInfo(i2, i3, max, max2, paddingWidth, i5);
int max3 = Math.max(0, getPaddingStart());
int max4 = Math.max(0, getPaddingEnd());
if (max3 <= 0 && max4 <= 0) {
max3 = Math.max(0, getPaddingLeft());
} else if (isRtl()) {
i4 = max4;
int i6 = size - paddingWidth;
int i7 = size2 - i5;
setSelfDimensionBehaviour(constraintWidgetContainer, mode, i6, mode2, i7);
constraintWidgetContainer.measure(i, mode, i6, mode2, i7, this.mLastMeasureWidth, this.mLastMeasureHeight, i4, max);
}
i4 = max3;
int i62 = size - paddingWidth;
int i72 = size2 - i5;
setSelfDimensionBehaviour(constraintWidgetContainer, mode, i62, mode2, i72);
constraintWidgetContainer.measure(i, mode, i62, mode2, i72, this.mLastMeasureWidth, this.mLastMeasureHeight, i4, max);
}
public void setConstraintSet(ConstraintSet constraintSet) {
this.mConstraintSet = constraintSet;
}
public void setDesignInformation(int i, Object obj, Object obj2) {
if (i == 0 && (obj instanceof String) && (obj2 instanceof Integer)) {
if (this.mDesignIds == null) {
this.mDesignIds = new HashMap<>();
}
String str = (String) obj;
int indexOf = str.indexOf("/");
if (indexOf != -1) {
str = str.substring(indexOf + 1);
}
this.mDesignIds.put(str, (Integer) obj2);
}
}
@Override // android.view.View
public void setId(int i) {
this.mChildrenByIds.remove(getId());
super.setId(i);
this.mChildrenByIds.put(getId(), this);
}
public void setMaxHeight(int i) {
if (i == this.mMaxHeight) {
return;
}
this.mMaxHeight = i;
requestLayout();
}
public void setMaxWidth(int i) {
if (i == this.mMaxWidth) {
return;
}
this.mMaxWidth = i;
requestLayout();
}
public void setMinHeight(int i) {
if (i == this.mMinHeight) {
return;
}
this.mMinHeight = i;
requestLayout();
}
public void setMinWidth(int i) {
if (i == this.mMinWidth) {
return;
}
this.mMinWidth = i;
requestLayout();
}
public void setOnConstraintsChanged(ConstraintsChangedListener constraintsChangedListener) {
ConstraintLayoutStates constraintLayoutStates = this.mConstraintLayoutSpec;
if (constraintLayoutStates != null) {
constraintLayoutStates.setOnConstraintsChanged(constraintsChangedListener);
}
}
public void setOptimizationLevel(int i) {
this.mOptimizationLevel = i;
this.mLayoutWidget.setOptimizationLevel(i);
}
public void setSelfDimensionBehaviour(ConstraintWidgetContainer constraintWidgetContainer, int i, int i2, int i3, int i4) {
ConstraintWidget.DimensionBehaviour dimensionBehaviour;
Measurer measurer = this.mMeasurer;
int i5 = measurer.mPaddingHeight;
int i6 = measurer.mPaddingWidth;
ConstraintWidget.DimensionBehaviour dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.FIXED;
int childCount = getChildCount();
if (i == Integer.MIN_VALUE) {
dimensionBehaviour = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
if (childCount == 0) {
i2 = Math.max(0, this.mMinWidth);
}
} else if (i == 0) {
dimensionBehaviour = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
if (childCount == 0) {
i2 = Math.max(0, this.mMinWidth);
}
i2 = 0;
} else if (i != 1073741824) {
dimensionBehaviour = dimensionBehaviour2;
i2 = 0;
} else {
i2 = Math.min(this.mMaxWidth - i6, i2);
dimensionBehaviour = dimensionBehaviour2;
}
if (i3 == Integer.MIN_VALUE) {
dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
if (childCount == 0) {
i4 = Math.max(0, this.mMinHeight);
}
} else if (i3 != 0) {
if (i3 == 1073741824) {
i4 = Math.min(this.mMaxHeight - i5, i4);
}
i4 = 0;
} else {
dimensionBehaviour2 = ConstraintWidget.DimensionBehaviour.WRAP_CONTENT;
if (childCount == 0) {
i4 = Math.max(0, this.mMinHeight);
}
i4 = 0;
}
if (i2 != constraintWidgetContainer.getWidth() || i4 != constraintWidgetContainer.getHeight()) {
constraintWidgetContainer.invalidateMeasures();
}
constraintWidgetContainer.setX(0);
constraintWidgetContainer.setY(0);
constraintWidgetContainer.setMaxWidth(this.mMaxWidth - i6);
constraintWidgetContainer.setMaxHeight(this.mMaxHeight - i5);
constraintWidgetContainer.setMinWidth(0);
constraintWidgetContainer.setMinHeight(0);
constraintWidgetContainer.setHorizontalDimensionBehaviour(dimensionBehaviour);
constraintWidgetContainer.setWidth(i2);
constraintWidgetContainer.setVerticalDimensionBehaviour(dimensionBehaviour2);
constraintWidgetContainer.setHeight(i4);
constraintWidgetContainer.setMinWidth(this.mMinWidth - i6);
constraintWidgetContainer.setMinHeight(this.mMinHeight - i5);
}
public void setState(int i, int i2, int i3) {
ConstraintLayoutStates constraintLayoutStates = this.mConstraintLayoutSpec;
if (constraintLayoutStates != null) {
constraintLayoutStates.updateConstraints(i, i2, i3);
}
}
@Override // android.view.ViewGroup
public boolean shouldDelayChildPressedState() {
return false;
}
@Override // android.view.ViewGroup
public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
return new LayoutParams(layoutParams);
}
public ConstraintLayout(@NonNull Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.mChildrenByIds = new SparseArray<>();
this.mConstraintHelpers = new ArrayList<>(4);
this.mLayoutWidget = new ConstraintWidgetContainer();
this.mMinWidth = 0;
this.mMinHeight = 0;
this.mMaxWidth = Integer.MAX_VALUE;
this.mMaxHeight = Integer.MAX_VALUE;
this.mDirtyHierarchy = true;
this.mOptimizationLevel = 257;
this.mConstraintSet = null;
this.mConstraintLayoutSpec = null;
this.mConstraintSetId = -1;
this.mDesignIds = new HashMap<>();
this.mLastMeasureWidth = -1;
this.mLastMeasureHeight = -1;
this.mLastMeasureWidthSize = -1;
this.mLastMeasureHeightSize = -1;
this.mLastMeasureWidthMode = 0;
this.mLastMeasureHeightMode = 0;
this.mTempMapIdToWidget = new SparseArray<>();
this.mMeasurer = new Measurer(this);
this.mOnMeasureWidthMeasureSpec = 0;
this.mOnMeasureHeightMeasureSpec = 0;
init(attributeSet, 0, 0);
}
public ConstraintLayout(@NonNull Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.mChildrenByIds = new SparseArray<>();
this.mConstraintHelpers = new ArrayList<>(4);
this.mLayoutWidget = new ConstraintWidgetContainer();
this.mMinWidth = 0;
this.mMinHeight = 0;
this.mMaxWidth = Integer.MAX_VALUE;
this.mMaxHeight = Integer.MAX_VALUE;
this.mDirtyHierarchy = true;
this.mOptimizationLevel = 257;
this.mConstraintSet = null;
this.mConstraintLayoutSpec = null;
this.mConstraintSetId = -1;
this.mDesignIds = new HashMap<>();
this.mLastMeasureWidth = -1;
this.mLastMeasureHeight = -1;
this.mLastMeasureWidthSize = -1;
this.mLastMeasureHeightSize = -1;
this.mLastMeasureWidthMode = 0;
this.mLastMeasureHeightMode = 0;
this.mTempMapIdToWidget = new SparseArray<>();
this.mMeasurer = new Measurer(this);
this.mOnMeasureWidthMeasureSpec = 0;
this.mOnMeasureHeightMeasureSpec = 0;
init(attributeSet, i, 0);
}
@TargetApi(21)
public ConstraintLayout(@NonNull Context context, @Nullable AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
this.mChildrenByIds = new SparseArray<>();
this.mConstraintHelpers = new ArrayList<>(4);
this.mLayoutWidget = new ConstraintWidgetContainer();
this.mMinWidth = 0;
this.mMinHeight = 0;
this.mMaxWidth = Integer.MAX_VALUE;
this.mMaxHeight = Integer.MAX_VALUE;
this.mDirtyHierarchy = true;
this.mOptimizationLevel = 257;
this.mConstraintSet = null;
this.mConstraintLayoutSpec = null;
this.mConstraintSetId = -1;
this.mDesignIds = new HashMap<>();
this.mLastMeasureWidth = -1;
this.mLastMeasureHeight = -1;
this.mLastMeasureWidthSize = -1;
this.mLastMeasureHeightSize = -1;
this.mLastMeasureWidthMode = 0;
this.mLastMeasureHeightMode = 0;
this.mTempMapIdToWidget = new SparseArray<>();
this.mMeasurer = new Measurer(this);
this.mOnMeasureWidthMeasureSpec = 0;
this.mOnMeasureHeightMeasureSpec = 0;
init(attributeSet, i, i2);
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class LayoutParams extends ViewGroup.MarginLayoutParams {
public static final int BASELINE = 5;
public static final int BOTTOM = 4;
public static final int CHAIN_PACKED = 2;
public static final int CHAIN_SPREAD = 0;
public static final int CHAIN_SPREAD_INSIDE = 1;
public static final int CIRCLE = 8;
public static final int END = 7;
public static final int GONE_UNSET = Integer.MIN_VALUE;
public static final int HORIZONTAL = 0;
public static final int LEFT = 1;
public static final int MATCH_CONSTRAINT = 0;
public static final int MATCH_CONSTRAINT_PERCENT = 2;
public static final int MATCH_CONSTRAINT_SPREAD = 0;
public static final int MATCH_CONSTRAINT_WRAP = 1;
public static final int PARENT_ID = 0;
public static final int RIGHT = 2;
public static final int START = 6;
public static final int TOP = 3;
public static final int UNSET = -1;
public static final int VERTICAL = 1;
public static final int WRAP_BEHAVIOR_HORIZONTAL_ONLY = 1;
public static final int WRAP_BEHAVIOR_INCLUDED = 0;
public static final int WRAP_BEHAVIOR_SKIPPED = 3;
public static final int WRAP_BEHAVIOR_VERTICAL_ONLY = 2;
public int baselineMargin;
public int baselineToBaseline;
public int baselineToBottom;
public int baselineToTop;
public int bottomToBottom;
public int bottomToTop;
public float circleAngle;
public int circleConstraint;
public int circleRadius;
public boolean constrainedHeight;
public boolean constrainedWidth;
public String constraintTag;
public String dimensionRatio;
public int editorAbsoluteX;
public int editorAbsoluteY;
public int endToEnd;
public int endToStart;
public int goneBaselineMargin;
public int goneBottomMargin;
public int goneEndMargin;
public int goneLeftMargin;
public int goneRightMargin;
public int goneStartMargin;
public int goneTopMargin;
public int guideBegin;
public int guideEnd;
public float guidePercent;
public boolean guidelineUseRtl;
public boolean helped;
public float horizontalBias;
public int horizontalChainStyle;
public float horizontalWeight;
public int leftToLeft;
public int leftToRight;
int mDimensionRatioSide;
float mDimensionRatioValue;
boolean mHeightSet;
boolean mHorizontalDimensionFixed;
boolean mIsGuideline;
boolean mIsHelper;
boolean mIsInPlaceholder;
boolean mIsVirtualGroup;
boolean mNeedsBaseline;
int mResolveGoneLeftMargin;
int mResolveGoneRightMargin;
int mResolvedGuideBegin;
int mResolvedGuideEnd;
float mResolvedGuidePercent;
float mResolvedHorizontalBias;
int mResolvedLeftToLeft;
int mResolvedLeftToRight;
int mResolvedRightToLeft;
int mResolvedRightToRight;
boolean mVerticalDimensionFixed;
ConstraintWidget mWidget;
boolean mWidthSet;
public int matchConstraintDefaultHeight;
public int matchConstraintDefaultWidth;
public int matchConstraintMaxHeight;
public int matchConstraintMaxWidth;
public int matchConstraintMinHeight;
public int matchConstraintMinWidth;
public float matchConstraintPercentHeight;
public float matchConstraintPercentWidth;
public int orientation;
public int rightToLeft;
public int rightToRight;
public int startToEnd;
public int startToStart;
public int topToBottom;
public int topToTop;
public float verticalBias;
public int verticalChainStyle;
public float verticalWeight;
public int wrapBehaviorInParent;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class Table {
public static final int ANDROID_ORIENTATION = 1;
public static final int GUIDELINE_USE_RTL = 67;
public static final int LAYOUT_CONSTRAINED_HEIGHT = 28;
public static final int LAYOUT_CONSTRAINED_WIDTH = 27;
public static final int LAYOUT_CONSTRAINT_BASELINE_CREATOR = 43;
public static final int LAYOUT_CONSTRAINT_BASELINE_TO_BASELINE_OF = 16;
public static final int LAYOUT_CONSTRAINT_BASELINE_TO_BOTTOM_OF = 53;
public static final int LAYOUT_CONSTRAINT_BASELINE_TO_TOP_OF = 52;
public static final int LAYOUT_CONSTRAINT_BOTTOM_CREATOR = 42;
public static final int LAYOUT_CONSTRAINT_BOTTOM_TO_BOTTOM_OF = 15;
public static final int LAYOUT_CONSTRAINT_BOTTOM_TO_TOP_OF = 14;
public static final int LAYOUT_CONSTRAINT_CIRCLE = 2;
public static final int LAYOUT_CONSTRAINT_CIRCLE_ANGLE = 4;
public static final int LAYOUT_CONSTRAINT_CIRCLE_RADIUS = 3;
public static final int LAYOUT_CONSTRAINT_DIMENSION_RATIO = 44;
public static final int LAYOUT_CONSTRAINT_END_TO_END_OF = 20;
public static final int LAYOUT_CONSTRAINT_END_TO_START_OF = 19;
public static final int LAYOUT_CONSTRAINT_GUIDE_BEGIN = 5;
public static final int LAYOUT_CONSTRAINT_GUIDE_END = 6;
public static final int LAYOUT_CONSTRAINT_GUIDE_PERCENT = 7;
public static final int LAYOUT_CONSTRAINT_HEIGHT = 65;
public static final int LAYOUT_CONSTRAINT_HEIGHT_DEFAULT = 32;
public static final int LAYOUT_CONSTRAINT_HEIGHT_MAX = 37;
public static final int LAYOUT_CONSTRAINT_HEIGHT_MIN = 36;
public static final int LAYOUT_CONSTRAINT_HEIGHT_PERCENT = 38;
public static final int LAYOUT_CONSTRAINT_HORIZONTAL_BIAS = 29;
public static final int LAYOUT_CONSTRAINT_HORIZONTAL_CHAINSTYLE = 47;
public static final int LAYOUT_CONSTRAINT_HORIZONTAL_WEIGHT = 45;
public static final int LAYOUT_CONSTRAINT_LEFT_CREATOR = 39;
public static final int LAYOUT_CONSTRAINT_LEFT_TO_LEFT_OF = 8;
public static final int LAYOUT_CONSTRAINT_LEFT_TO_RIGHT_OF = 9;
public static final int LAYOUT_CONSTRAINT_RIGHT_CREATOR = 41;
public static final int LAYOUT_CONSTRAINT_RIGHT_TO_LEFT_OF = 10;
public static final int LAYOUT_CONSTRAINT_RIGHT_TO_RIGHT_OF = 11;
public static final int LAYOUT_CONSTRAINT_START_TO_END_OF = 17;
public static final int LAYOUT_CONSTRAINT_START_TO_START_OF = 18;
public static final int LAYOUT_CONSTRAINT_TAG = 51;
public static final int LAYOUT_CONSTRAINT_TOP_CREATOR = 40;
public static final int LAYOUT_CONSTRAINT_TOP_TO_BOTTOM_OF = 13;
public static final int LAYOUT_CONSTRAINT_TOP_TO_TOP_OF = 12;
public static final int LAYOUT_CONSTRAINT_VERTICAL_BIAS = 30;
public static final int LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE = 48;
public static final int LAYOUT_CONSTRAINT_VERTICAL_WEIGHT = 46;
public static final int LAYOUT_CONSTRAINT_WIDTH = 64;
public static final int LAYOUT_CONSTRAINT_WIDTH_DEFAULT = 31;
public static final int LAYOUT_CONSTRAINT_WIDTH_MAX = 34;
public static final int LAYOUT_CONSTRAINT_WIDTH_MIN = 33;
public static final int LAYOUT_CONSTRAINT_WIDTH_PERCENT = 35;
public static final int LAYOUT_EDITOR_ABSOLUTEX = 49;
public static final int LAYOUT_EDITOR_ABSOLUTEY = 50;
public static final int LAYOUT_GONE_MARGIN_BASELINE = 55;
public static final int LAYOUT_GONE_MARGIN_BOTTOM = 24;
public static final int LAYOUT_GONE_MARGIN_END = 26;
public static final int LAYOUT_GONE_MARGIN_LEFT = 21;
public static final int LAYOUT_GONE_MARGIN_RIGHT = 23;
public static final int LAYOUT_GONE_MARGIN_START = 25;
public static final int LAYOUT_GONE_MARGIN_TOP = 22;
public static final int LAYOUT_MARGIN_BASELINE = 54;
public static final int LAYOUT_WRAP_BEHAVIOR_IN_PARENT = 66;
public static final int UNUSED = 0;
public static final SparseIntArray sMap;
static {
SparseIntArray sparseIntArray = new SparseIntArray();
sMap = sparseIntArray;
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintWidth, 64);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHeight, 65);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintLeft_toLeftOf, 8);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintLeft_toRightOf, 9);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintRight_toLeftOf, 10);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintRight_toRightOf, 11);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintTop_toTopOf, 12);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintTop_toBottomOf, 13);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBottom_toTopOf, 14);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBottom_toBottomOf, 15);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBaseline_toBaselineOf, 16);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBaseline_toTopOf, 52);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBaseline_toBottomOf, 53);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintCircle, 2);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintCircleRadius, 3);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintCircleAngle, 4);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_editor_absoluteX, 49);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_editor_absoluteY, 50);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintGuide_begin, 5);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintGuide_end, 6);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintGuide_percent, 7);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_guidelineUseRtl, 67);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_android_orientation, 1);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintStart_toEndOf, 17);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintStart_toStartOf, 18);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintEnd_toStartOf, 19);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintEnd_toEndOf, 20);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginLeft, 21);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginTop, 22);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginRight, 23);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginBottom, 24);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginStart, 25);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginEnd, 26);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_goneMarginBaseline, 55);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_marginBaseline, 54);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHorizontal_bias, 29);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintVertical_bias, 30);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintDimensionRatio, 44);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHorizontal_weight, 45);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintVertical_weight, 46);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHorizontal_chainStyle, 47);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintVertical_chainStyle, 48);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constrainedWidth, 27);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constrainedHeight, 28);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintWidth_default, 31);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHeight_default, 32);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintWidth_min, 33);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintWidth_max, 34);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintWidth_percent, 35);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHeight_min, 36);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHeight_max, 37);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintHeight_percent, 38);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintLeft_creator, 39);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintTop_creator, 40);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintRight_creator, 41);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBottom_creator, 42);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintBaseline_creator, 43);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_constraintTag, 51);
sparseIntArray.append(R.styleable.ConstraintLayout_Layout_layout_wrapBehaviorInParent, 66);
}
private Table() {
}
}
public LayoutParams(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.guideBegin = -1;
this.guideEnd = -1;
this.guidePercent = -1.0f;
this.guidelineUseRtl = true;
this.leftToLeft = -1;
this.leftToRight = -1;
this.rightToLeft = -1;
this.rightToRight = -1;
this.topToTop = -1;
this.topToBottom = -1;
this.bottomToTop = -1;
this.bottomToBottom = -1;
this.baselineToBaseline = -1;
this.baselineToTop = -1;
this.baselineToBottom = -1;
this.circleConstraint = -1;
this.circleRadius = 0;
this.circleAngle = 0.0f;
this.startToEnd = -1;
this.startToStart = -1;
this.endToStart = -1;
this.endToEnd = -1;
this.goneLeftMargin = Integer.MIN_VALUE;
this.goneTopMargin = Integer.MIN_VALUE;
this.goneRightMargin = Integer.MIN_VALUE;
this.goneBottomMargin = Integer.MIN_VALUE;
this.goneStartMargin = Integer.MIN_VALUE;
this.goneEndMargin = Integer.MIN_VALUE;
this.goneBaselineMargin = Integer.MIN_VALUE;
this.baselineMargin = 0;
this.mWidthSet = true;
this.mHeightSet = true;
this.horizontalBias = 0.5f;
this.verticalBias = 0.5f;
this.dimensionRatio = null;
this.mDimensionRatioValue = 0.0f;
this.mDimensionRatioSide = 1;
this.horizontalWeight = -1.0f;
this.verticalWeight = -1.0f;
this.horizontalChainStyle = 0;
this.verticalChainStyle = 0;
this.matchConstraintDefaultWidth = 0;
this.matchConstraintDefaultHeight = 0;
this.matchConstraintMinWidth = 0;
this.matchConstraintMinHeight = 0;
this.matchConstraintMaxWidth = 0;
this.matchConstraintMaxHeight = 0;
this.matchConstraintPercentWidth = 1.0f;
this.matchConstraintPercentHeight = 1.0f;
this.editorAbsoluteX = -1;
this.editorAbsoluteY = -1;
this.orientation = -1;
this.constrainedWidth = false;
this.constrainedHeight = false;
this.constraintTag = null;
this.wrapBehaviorInParent = 0;
this.mHorizontalDimensionFixed = true;
this.mVerticalDimensionFixed = true;
this.mNeedsBaseline = false;
this.mIsGuideline = false;
this.mIsHelper = false;
this.mIsInPlaceholder = false;
this.mIsVirtualGroup = false;
this.mResolvedLeftToLeft = -1;
this.mResolvedLeftToRight = -1;
this.mResolvedRightToLeft = -1;
this.mResolvedRightToRight = -1;
this.mResolveGoneLeftMargin = Integer.MIN_VALUE;
this.mResolveGoneRightMargin = Integer.MIN_VALUE;
this.mResolvedHorizontalBias = 0.5f;
this.mWidget = new ConstraintWidget();
this.helped = false;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R.styleable.ConstraintLayout_Layout);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i = 0; i < indexCount; i++) {
int index = obtainStyledAttributes.getIndex(i);
int i2 = Table.sMap.get(index);
switch (i2) {
case 1:
this.orientation = obtainStyledAttributes.getInt(index, this.orientation);
break;
case 2:
int resourceId = obtainStyledAttributes.getResourceId(index, this.circleConstraint);
this.circleConstraint = resourceId;
if (resourceId == -1) {
this.circleConstraint = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 3:
this.circleRadius = obtainStyledAttributes.getDimensionPixelSize(index, this.circleRadius);
break;
case 4:
float f = obtainStyledAttributes.getFloat(index, this.circleAngle) % 360.0f;
this.circleAngle = f;
if (f < 0.0f) {
this.circleAngle = (360.0f - f) % 360.0f;
break;
} else {
break;
}
case 5:
this.guideBegin = obtainStyledAttributes.getDimensionPixelOffset(index, this.guideBegin);
break;
case 6:
this.guideEnd = obtainStyledAttributes.getDimensionPixelOffset(index, this.guideEnd);
break;
case 7:
this.guidePercent = obtainStyledAttributes.getFloat(index, this.guidePercent);
break;
case 8:
int resourceId2 = obtainStyledAttributes.getResourceId(index, this.leftToLeft);
this.leftToLeft = resourceId2;
if (resourceId2 == -1) {
this.leftToLeft = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 9:
int resourceId3 = obtainStyledAttributes.getResourceId(index, this.leftToRight);
this.leftToRight = resourceId3;
if (resourceId3 == -1) {
this.leftToRight = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 10:
int resourceId4 = obtainStyledAttributes.getResourceId(index, this.rightToLeft);
this.rightToLeft = resourceId4;
if (resourceId4 == -1) {
this.rightToLeft = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 11:
int resourceId5 = obtainStyledAttributes.getResourceId(index, this.rightToRight);
this.rightToRight = resourceId5;
if (resourceId5 == -1) {
this.rightToRight = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 12:
int resourceId6 = obtainStyledAttributes.getResourceId(index, this.topToTop);
this.topToTop = resourceId6;
if (resourceId6 == -1) {
this.topToTop = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 13:
int resourceId7 = obtainStyledAttributes.getResourceId(index, this.topToBottom);
this.topToBottom = resourceId7;
if (resourceId7 == -1) {
this.topToBottom = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 14:
int resourceId8 = obtainStyledAttributes.getResourceId(index, this.bottomToTop);
this.bottomToTop = resourceId8;
if (resourceId8 == -1) {
this.bottomToTop = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 15:
int resourceId9 = obtainStyledAttributes.getResourceId(index, this.bottomToBottom);
this.bottomToBottom = resourceId9;
if (resourceId9 == -1) {
this.bottomToBottom = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 16:
int resourceId10 = obtainStyledAttributes.getResourceId(index, this.baselineToBaseline);
this.baselineToBaseline = resourceId10;
if (resourceId10 == -1) {
this.baselineToBaseline = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 17:
int resourceId11 = obtainStyledAttributes.getResourceId(index, this.startToEnd);
this.startToEnd = resourceId11;
if (resourceId11 == -1) {
this.startToEnd = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 18:
int resourceId12 = obtainStyledAttributes.getResourceId(index, this.startToStart);
this.startToStart = resourceId12;
if (resourceId12 == -1) {
this.startToStart = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 19:
int resourceId13 = obtainStyledAttributes.getResourceId(index, this.endToStart);
this.endToStart = resourceId13;
if (resourceId13 == -1) {
this.endToStart = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 20:
int resourceId14 = obtainStyledAttributes.getResourceId(index, this.endToEnd);
this.endToEnd = resourceId14;
if (resourceId14 == -1) {
this.endToEnd = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 21:
this.goneLeftMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneLeftMargin);
break;
case 22:
this.goneTopMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneTopMargin);
break;
case 23:
this.goneRightMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneRightMargin);
break;
case 24:
this.goneBottomMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneBottomMargin);
break;
case 25:
this.goneStartMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneStartMargin);
break;
case 26:
this.goneEndMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneEndMargin);
break;
case 27:
this.constrainedWidth = obtainStyledAttributes.getBoolean(index, this.constrainedWidth);
break;
case 28:
this.constrainedHeight = obtainStyledAttributes.getBoolean(index, this.constrainedHeight);
break;
case 29:
this.horizontalBias = obtainStyledAttributes.getFloat(index, this.horizontalBias);
break;
case 30:
this.verticalBias = obtainStyledAttributes.getFloat(index, this.verticalBias);
break;
case 31:
int i3 = obtainStyledAttributes.getInt(index, 0);
this.matchConstraintDefaultWidth = i3;
if (i3 == 1) {
Log.e(ConstraintLayout.TAG, "layout_constraintWidth_default=\"wrap\" is deprecated.\nUse layout_width=\"WRAP_CONTENT\" and layout_constrainedWidth=\"true\" instead.");
break;
} else {
break;
}
case 32:
int i4 = obtainStyledAttributes.getInt(index, 0);
this.matchConstraintDefaultHeight = i4;
if (i4 == 1) {
Log.e(ConstraintLayout.TAG, "layout_constraintHeight_default=\"wrap\" is deprecated.\nUse layout_height=\"WRAP_CONTENT\" and layout_constrainedHeight=\"true\" instead.");
break;
} else {
break;
}
case 33:
try {
this.matchConstraintMinWidth = obtainStyledAttributes.getDimensionPixelSize(index, this.matchConstraintMinWidth);
break;
} catch (Exception unused) {
if (obtainStyledAttributes.getInt(index, this.matchConstraintMinWidth) == -2) {
this.matchConstraintMinWidth = -2;
break;
} else {
break;
}
}
case 34:
try {
this.matchConstraintMaxWidth = obtainStyledAttributes.getDimensionPixelSize(index, this.matchConstraintMaxWidth);
break;
} catch (Exception unused2) {
if (obtainStyledAttributes.getInt(index, this.matchConstraintMaxWidth) == -2) {
this.matchConstraintMaxWidth = -2;
break;
} else {
break;
}
}
case 35:
this.matchConstraintPercentWidth = Math.max(0.0f, obtainStyledAttributes.getFloat(index, this.matchConstraintPercentWidth));
this.matchConstraintDefaultWidth = 2;
break;
case 36:
try {
this.matchConstraintMinHeight = obtainStyledAttributes.getDimensionPixelSize(index, this.matchConstraintMinHeight);
break;
} catch (Exception unused3) {
if (obtainStyledAttributes.getInt(index, this.matchConstraintMinHeight) == -2) {
this.matchConstraintMinHeight = -2;
break;
} else {
break;
}
}
case 37:
try {
this.matchConstraintMaxHeight = obtainStyledAttributes.getDimensionPixelSize(index, this.matchConstraintMaxHeight);
break;
} catch (Exception unused4) {
if (obtainStyledAttributes.getInt(index, this.matchConstraintMaxHeight) == -2) {
this.matchConstraintMaxHeight = -2;
break;
} else {
break;
}
}
case 38:
this.matchConstraintPercentHeight = Math.max(0.0f, obtainStyledAttributes.getFloat(index, this.matchConstraintPercentHeight));
this.matchConstraintDefaultHeight = 2;
break;
default:
switch (i2) {
case 44:
ConstraintSet.parseDimensionRatioString(this, obtainStyledAttributes.getString(index));
break;
case 45:
this.horizontalWeight = obtainStyledAttributes.getFloat(index, this.horizontalWeight);
break;
case 46:
this.verticalWeight = obtainStyledAttributes.getFloat(index, this.verticalWeight);
break;
case 47:
this.horizontalChainStyle = obtainStyledAttributes.getInt(index, 0);
break;
case 48:
this.verticalChainStyle = obtainStyledAttributes.getInt(index, 0);
break;
case 49:
this.editorAbsoluteX = obtainStyledAttributes.getDimensionPixelOffset(index, this.editorAbsoluteX);
break;
case 50:
this.editorAbsoluteY = obtainStyledAttributes.getDimensionPixelOffset(index, this.editorAbsoluteY);
break;
case 51:
this.constraintTag = obtainStyledAttributes.getString(index);
break;
case 52:
int resourceId15 = obtainStyledAttributes.getResourceId(index, this.baselineToTop);
this.baselineToTop = resourceId15;
if (resourceId15 == -1) {
this.baselineToTop = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 53:
int resourceId16 = obtainStyledAttributes.getResourceId(index, this.baselineToBottom);
this.baselineToBottom = resourceId16;
if (resourceId16 == -1) {
this.baselineToBottom = obtainStyledAttributes.getInt(index, -1);
break;
} else {
break;
}
case 54:
this.baselineMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.baselineMargin);
break;
case 55:
this.goneBaselineMargin = obtainStyledAttributes.getDimensionPixelSize(index, this.goneBaselineMargin);
break;
default:
switch (i2) {
case 64:
ConstraintSet.parseDimensionConstraints(this, obtainStyledAttributes, index, 0);
this.mWidthSet = true;
break;
case 65:
ConstraintSet.parseDimensionConstraints(this, obtainStyledAttributes, index, 1);
this.mHeightSet = true;
break;
case 66:
this.wrapBehaviorInParent = obtainStyledAttributes.getInt(index, this.wrapBehaviorInParent);
break;
case 67:
this.guidelineUseRtl = obtainStyledAttributes.getBoolean(index, this.guidelineUseRtl);
break;
}
}
}
}
obtainStyledAttributes.recycle();
validate();
}
public String getConstraintTag() {
return this.constraintTag;
}
public ConstraintWidget getConstraintWidget() {
return this.mWidget;
}
public void reset() {
ConstraintWidget constraintWidget = this.mWidget;
if (constraintWidget != null) {
constraintWidget.reset();
}
}
/* JADX WARN: Removed duplicated region for block: B:11:0x004a */
/* JADX WARN: Removed duplicated region for block: B:14:0x0051 */
/* JADX WARN: Removed duplicated region for block: B:17:0x0058 */
/* JADX WARN: Removed duplicated region for block: B:20:0x005e */
/* JADX WARN: Removed duplicated region for block: B:23:0x0064 */
/* JADX WARN: Removed duplicated region for block: B:32:0x007a */
/* JADX WARN: Removed duplicated region for block: B:33:0x0082 */
@Override // android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.LayoutParams
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void resolveLayoutDirection(int r12) {
/*
Method dump skipped, instructions count: 257
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.resolveLayoutDirection(int):void");
}
public void setWidgetDebugName(String str) {
this.mWidget.setDebugName(str);
}
public void validate() {
this.mIsGuideline = false;
this.mHorizontalDimensionFixed = true;
this.mVerticalDimensionFixed = true;
int i = ((ViewGroup.MarginLayoutParams) this).width;
if (i == -2 && this.constrainedWidth) {
this.mHorizontalDimensionFixed = false;
if (this.matchConstraintDefaultWidth == 0) {
this.matchConstraintDefaultWidth = 1;
}
}
int i2 = ((ViewGroup.MarginLayoutParams) this).height;
if (i2 == -2 && this.constrainedHeight) {
this.mVerticalDimensionFixed = false;
if (this.matchConstraintDefaultHeight == 0) {
this.matchConstraintDefaultHeight = 1;
}
}
if (i == 0 || i == -1) {
this.mHorizontalDimensionFixed = false;
if (i == 0 && this.matchConstraintDefaultWidth == 1) {
((ViewGroup.MarginLayoutParams) this).width = -2;
this.constrainedWidth = true;
}
}
if (i2 == 0 || i2 == -1) {
this.mVerticalDimensionFixed = false;
if (i2 == 0 && this.matchConstraintDefaultHeight == 1) {
((ViewGroup.MarginLayoutParams) this).height = -2;
this.constrainedHeight = true;
}
}
if (this.guidePercent == -1.0f && this.guideBegin == -1 && this.guideEnd == -1) {
return;
}
this.mIsGuideline = true;
this.mHorizontalDimensionFixed = true;
this.mVerticalDimensionFixed = true;
if (!(this.mWidget instanceof androidx.constraintlayout.core.widgets.Guideline)) {
this.mWidget = new androidx.constraintlayout.core.widgets.Guideline();
}
((androidx.constraintlayout.core.widgets.Guideline) this.mWidget).setOrientation(this.orientation);
}
@SuppressLint({"ClassVerificationFailure"})
public LayoutParams(ViewGroup.LayoutParams layoutParams) {
super(layoutParams);
this.guideBegin = -1;
this.guideEnd = -1;
this.guidePercent = -1.0f;
this.guidelineUseRtl = true;
this.leftToLeft = -1;
this.leftToRight = -1;
this.rightToLeft = -1;
this.rightToRight = -1;
this.topToTop = -1;
this.topToBottom = -1;
this.bottomToTop = -1;
this.bottomToBottom = -1;
this.baselineToBaseline = -1;
this.baselineToTop = -1;
this.baselineToBottom = -1;
this.circleConstraint = -1;
this.circleRadius = 0;
this.circleAngle = 0.0f;
this.startToEnd = -1;
this.startToStart = -1;
this.endToStart = -1;
this.endToEnd = -1;
this.goneLeftMargin = Integer.MIN_VALUE;
this.goneTopMargin = Integer.MIN_VALUE;
this.goneRightMargin = Integer.MIN_VALUE;
this.goneBottomMargin = Integer.MIN_VALUE;
this.goneStartMargin = Integer.MIN_VALUE;
this.goneEndMargin = Integer.MIN_VALUE;
this.goneBaselineMargin = Integer.MIN_VALUE;
this.baselineMargin = 0;
this.mWidthSet = true;
this.mHeightSet = true;
this.horizontalBias = 0.5f;
this.verticalBias = 0.5f;
this.dimensionRatio = null;
this.mDimensionRatioValue = 0.0f;
this.mDimensionRatioSide = 1;
this.horizontalWeight = -1.0f;
this.verticalWeight = -1.0f;
this.horizontalChainStyle = 0;
this.verticalChainStyle = 0;
this.matchConstraintDefaultWidth = 0;
this.matchConstraintDefaultHeight = 0;
this.matchConstraintMinWidth = 0;
this.matchConstraintMinHeight = 0;
this.matchConstraintMaxWidth = 0;
this.matchConstraintMaxHeight = 0;
this.matchConstraintPercentWidth = 1.0f;
this.matchConstraintPercentHeight = 1.0f;
this.editorAbsoluteX = -1;
this.editorAbsoluteY = -1;
this.orientation = -1;
this.constrainedWidth = false;
this.constrainedHeight = false;
this.constraintTag = null;
this.wrapBehaviorInParent = 0;
this.mHorizontalDimensionFixed = true;
this.mVerticalDimensionFixed = true;
this.mNeedsBaseline = false;
this.mIsGuideline = false;
this.mIsHelper = false;
this.mIsInPlaceholder = false;
this.mIsVirtualGroup = false;
this.mResolvedLeftToLeft = -1;
this.mResolvedLeftToRight = -1;
this.mResolvedRightToLeft = -1;
this.mResolvedRightToRight = -1;
this.mResolveGoneLeftMargin = Integer.MIN_VALUE;
this.mResolveGoneRightMargin = Integer.MIN_VALUE;
this.mResolvedHorizontalBias = 0.5f;
this.mWidget = new ConstraintWidget();
this.helped = false;
if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
((ViewGroup.MarginLayoutParams) this).leftMargin = marginLayoutParams.leftMargin;
((ViewGroup.MarginLayoutParams) this).rightMargin = marginLayoutParams.rightMargin;
((ViewGroup.MarginLayoutParams) this).topMargin = marginLayoutParams.topMargin;
((ViewGroup.MarginLayoutParams) this).bottomMargin = marginLayoutParams.bottomMargin;
setMarginStart(marginLayoutParams.getMarginStart());
setMarginEnd(marginLayoutParams.getMarginEnd());
}
if (layoutParams instanceof LayoutParams) {
LayoutParams layoutParams2 = (LayoutParams) layoutParams;
this.guideBegin = layoutParams2.guideBegin;
this.guideEnd = layoutParams2.guideEnd;
this.guidePercent = layoutParams2.guidePercent;
this.guidelineUseRtl = layoutParams2.guidelineUseRtl;
this.leftToLeft = layoutParams2.leftToLeft;
this.leftToRight = layoutParams2.leftToRight;
this.rightToLeft = layoutParams2.rightToLeft;
this.rightToRight = layoutParams2.rightToRight;
this.topToTop = layoutParams2.topToTop;
this.topToBottom = layoutParams2.topToBottom;
this.bottomToTop = layoutParams2.bottomToTop;
this.bottomToBottom = layoutParams2.bottomToBottom;
this.baselineToBaseline = layoutParams2.baselineToBaseline;
this.baselineToTop = layoutParams2.baselineToTop;
this.baselineToBottom = layoutParams2.baselineToBottom;
this.circleConstraint = layoutParams2.circleConstraint;
this.circleRadius = layoutParams2.circleRadius;
this.circleAngle = layoutParams2.circleAngle;
this.startToEnd = layoutParams2.startToEnd;
this.startToStart = layoutParams2.startToStart;
this.endToStart = layoutParams2.endToStart;
this.endToEnd = layoutParams2.endToEnd;
this.goneLeftMargin = layoutParams2.goneLeftMargin;
this.goneTopMargin = layoutParams2.goneTopMargin;
this.goneRightMargin = layoutParams2.goneRightMargin;
this.goneBottomMargin = layoutParams2.goneBottomMargin;
this.goneStartMargin = layoutParams2.goneStartMargin;
this.goneEndMargin = layoutParams2.goneEndMargin;
this.goneBaselineMargin = layoutParams2.goneBaselineMargin;
this.baselineMargin = layoutParams2.baselineMargin;
this.horizontalBias = layoutParams2.horizontalBias;
this.verticalBias = layoutParams2.verticalBias;
this.dimensionRatio = layoutParams2.dimensionRatio;
this.mDimensionRatioValue = layoutParams2.mDimensionRatioValue;
this.mDimensionRatioSide = layoutParams2.mDimensionRatioSide;
this.horizontalWeight = layoutParams2.horizontalWeight;
this.verticalWeight = layoutParams2.verticalWeight;
this.horizontalChainStyle = layoutParams2.horizontalChainStyle;
this.verticalChainStyle = layoutParams2.verticalChainStyle;
this.constrainedWidth = layoutParams2.constrainedWidth;
this.constrainedHeight = layoutParams2.constrainedHeight;
this.matchConstraintDefaultWidth = layoutParams2.matchConstraintDefaultWidth;
this.matchConstraintDefaultHeight = layoutParams2.matchConstraintDefaultHeight;
this.matchConstraintMinWidth = layoutParams2.matchConstraintMinWidth;
this.matchConstraintMaxWidth = layoutParams2.matchConstraintMaxWidth;
this.matchConstraintMinHeight = layoutParams2.matchConstraintMinHeight;
this.matchConstraintMaxHeight = layoutParams2.matchConstraintMaxHeight;
this.matchConstraintPercentWidth = layoutParams2.matchConstraintPercentWidth;
this.matchConstraintPercentHeight = layoutParams2.matchConstraintPercentHeight;
this.editorAbsoluteX = layoutParams2.editorAbsoluteX;
this.editorAbsoluteY = layoutParams2.editorAbsoluteY;
this.orientation = layoutParams2.orientation;
this.mHorizontalDimensionFixed = layoutParams2.mHorizontalDimensionFixed;
this.mVerticalDimensionFixed = layoutParams2.mVerticalDimensionFixed;
this.mNeedsBaseline = layoutParams2.mNeedsBaseline;
this.mIsGuideline = layoutParams2.mIsGuideline;
this.mResolvedLeftToLeft = layoutParams2.mResolvedLeftToLeft;
this.mResolvedLeftToRight = layoutParams2.mResolvedLeftToRight;
this.mResolvedRightToLeft = layoutParams2.mResolvedRightToLeft;
this.mResolvedRightToRight = layoutParams2.mResolvedRightToRight;
this.mResolveGoneLeftMargin = layoutParams2.mResolveGoneLeftMargin;
this.mResolveGoneRightMargin = layoutParams2.mResolveGoneRightMargin;
this.mResolvedHorizontalBias = layoutParams2.mResolvedHorizontalBias;
this.constraintTag = layoutParams2.constraintTag;
this.wrapBehaviorInParent = layoutParams2.wrapBehaviorInParent;
this.mWidget = layoutParams2.mWidget;
this.mWidthSet = layoutParams2.mWidthSet;
this.mHeightSet = layoutParams2.mHeightSet;
}
}
public LayoutParams(int i, int i2) {
super(i, i2);
this.guideBegin = -1;
this.guideEnd = -1;
this.guidePercent = -1.0f;
this.guidelineUseRtl = true;
this.leftToLeft = -1;
this.leftToRight = -1;
this.rightToLeft = -1;
this.rightToRight = -1;
this.topToTop = -1;
this.topToBottom = -1;
this.bottomToTop = -1;
this.bottomToBottom = -1;
this.baselineToBaseline = -1;
this.baselineToTop = -1;
this.baselineToBottom = -1;
this.circleConstraint = -1;
this.circleRadius = 0;
this.circleAngle = 0.0f;
this.startToEnd = -1;
this.startToStart = -1;
this.endToStart = -1;
this.endToEnd = -1;
this.goneLeftMargin = Integer.MIN_VALUE;
this.goneTopMargin = Integer.MIN_VALUE;
this.goneRightMargin = Integer.MIN_VALUE;
this.goneBottomMargin = Integer.MIN_VALUE;
this.goneStartMargin = Integer.MIN_VALUE;
this.goneEndMargin = Integer.MIN_VALUE;
this.goneBaselineMargin = Integer.MIN_VALUE;
this.baselineMargin = 0;
this.mWidthSet = true;
this.mHeightSet = true;
this.horizontalBias = 0.5f;
this.verticalBias = 0.5f;
this.dimensionRatio = null;
this.mDimensionRatioValue = 0.0f;
this.mDimensionRatioSide = 1;
this.horizontalWeight = -1.0f;
this.verticalWeight = -1.0f;
this.horizontalChainStyle = 0;
this.verticalChainStyle = 0;
this.matchConstraintDefaultWidth = 0;
this.matchConstraintDefaultHeight = 0;
this.matchConstraintMinWidth = 0;
this.matchConstraintMinHeight = 0;
this.matchConstraintMaxWidth = 0;
this.matchConstraintMaxHeight = 0;
this.matchConstraintPercentWidth = 1.0f;
this.matchConstraintPercentHeight = 1.0f;
this.editorAbsoluteX = -1;
this.editorAbsoluteY = -1;
this.orientation = -1;
this.constrainedWidth = false;
this.constrainedHeight = false;
this.constraintTag = null;
this.wrapBehaviorInParent = 0;
this.mHorizontalDimensionFixed = true;
this.mVerticalDimensionFixed = true;
this.mNeedsBaseline = false;
this.mIsGuideline = false;
this.mIsHelper = false;
this.mIsInPlaceholder = false;
this.mIsVirtualGroup = false;
this.mResolvedLeftToLeft = -1;
this.mResolvedLeftToRight = -1;
this.mResolvedRightToLeft = -1;
this.mResolvedRightToRight = -1;
this.mResolveGoneLeftMargin = Integer.MIN_VALUE;
this.mResolveGoneRightMargin = Integer.MIN_VALUE;
this.mResolvedHorizontalBias = 0.5f;
this.mWidget = new ConstraintWidget();
this.helped = false;
}
}
}