100 lines
3.6 KiB
Java
100 lines
3.6 KiB
Java
package androidx.constraintlayout.solver.state.helpers;
|
|
|
|
import androidx.constraintlayout.solver.state.HelperReference;
|
|
import androidx.constraintlayout.solver.state.State;
|
|
import androidx.constraintlayout.solver.widgets.Barrier;
|
|
import androidx.constraintlayout.solver.widgets.HelperWidget;
|
|
public class BarrierReference extends HelperReference {
|
|
private Barrier mBarrierWidget;
|
|
private State.Direction mDirection;
|
|
private int mMargin;
|
|
|
|
/* renamed from: androidx.constraintlayout.solver.state.helpers.BarrierReference$1 reason: invalid class name */
|
|
public static /* synthetic */ class AnonymousClass1 {
|
|
public static final /* synthetic */ int[] $SwitchMap$androidx$constraintlayout$solver$state$State$Direction;
|
|
|
|
static {
|
|
State.Direction.values();
|
|
int[] iArr = new int[6];
|
|
$SwitchMap$androidx$constraintlayout$solver$state$State$Direction = iArr;
|
|
try {
|
|
iArr[State.Direction.LEFT.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
$SwitchMap$androidx$constraintlayout$solver$state$State$Direction[State.Direction.START.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
$SwitchMap$androidx$constraintlayout$solver$state$State$Direction[State.Direction.RIGHT.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
$SwitchMap$androidx$constraintlayout$solver$state$State$Direction[State.Direction.END.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
try {
|
|
$SwitchMap$androidx$constraintlayout$solver$state$State$Direction[State.Direction.TOP.ordinal()] = 5;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
try {
|
|
$SwitchMap$androidx$constraintlayout$solver$state$State$Direction[State.Direction.BOTTOM.ordinal()] = 6;
|
|
} catch (NoSuchFieldError unused6) {
|
|
}
|
|
}
|
|
}
|
|
|
|
public BarrierReference(State state) {
|
|
super(state, State.Helper.BARRIER);
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:8:0x0019, code lost:
|
|
if (r0 != 5) goto L_0x001b;
|
|
*/
|
|
@Override // androidx.constraintlayout.solver.state.HelperReference
|
|
public void apply() {
|
|
getHelperWidget();
|
|
int ordinal = this.mDirection.ordinal();
|
|
int i = 3;
|
|
if (ordinal != 0) {
|
|
if (ordinal != 1) {
|
|
if (ordinal != 2) {
|
|
if (ordinal != 3) {
|
|
if (ordinal == 4) {
|
|
i = 2;
|
|
}
|
|
this.mBarrierWidget.setBarrierType(i);
|
|
this.mBarrierWidget.setMargin(this.mMargin);
|
|
}
|
|
}
|
|
}
|
|
i = 1;
|
|
this.mBarrierWidget.setBarrierType(i);
|
|
this.mBarrierWidget.setMargin(this.mMargin);
|
|
}
|
|
i = 0;
|
|
this.mBarrierWidget.setBarrierType(i);
|
|
this.mBarrierWidget.setMargin(this.mMargin);
|
|
}
|
|
|
|
@Override // androidx.constraintlayout.solver.state.HelperReference
|
|
public HelperWidget getHelperWidget() {
|
|
if (this.mBarrierWidget == null) {
|
|
this.mBarrierWidget = new Barrier();
|
|
}
|
|
return this.mBarrierWidget;
|
|
}
|
|
|
|
public void margin(int i) {
|
|
this.mMargin = i;
|
|
}
|
|
|
|
public void margin(Object obj) {
|
|
margin(this.mState.convertDimension(obj));
|
|
}
|
|
|
|
public void setBarrierDirection(State.Direction direction) {
|
|
this.mDirection = direction;
|
|
}
|
|
}
|