alexandroid/decompiled/jadx/sources/androidx/appcompat/widget/RtlSpacingHelper.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

100 lines
2.6 KiB
Java

package androidx.appcompat.widget;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes.dex */
class RtlSpacingHelper {
public static final int UNDEFINED = Integer.MIN_VALUE;
private int mLeft = 0;
private int mRight = 0;
private int mStart = Integer.MIN_VALUE;
private int mEnd = Integer.MIN_VALUE;
private int mExplicitLeft = 0;
private int mExplicitRight = 0;
private boolean mIsRtl = false;
private boolean mIsRelative = false;
public int getEnd() {
return this.mIsRtl ? this.mLeft : this.mRight;
}
public int getLeft() {
return this.mLeft;
}
public int getRight() {
return this.mRight;
}
public int getStart() {
return this.mIsRtl ? this.mRight : this.mLeft;
}
public void setAbsolute(int i, int i2) {
this.mIsRelative = false;
if (i != Integer.MIN_VALUE) {
this.mExplicitLeft = i;
this.mLeft = i;
}
if (i2 != Integer.MIN_VALUE) {
this.mExplicitRight = i2;
this.mRight = i2;
}
}
public void setDirection(boolean z) {
if (z == this.mIsRtl) {
return;
}
this.mIsRtl = z;
if (!this.mIsRelative) {
this.mLeft = this.mExplicitLeft;
this.mRight = this.mExplicitRight;
return;
}
if (z) {
int i = this.mEnd;
if (i == Integer.MIN_VALUE) {
i = this.mExplicitLeft;
}
this.mLeft = i;
int i2 = this.mStart;
if (i2 == Integer.MIN_VALUE) {
i2 = this.mExplicitRight;
}
this.mRight = i2;
return;
}
int i3 = this.mStart;
if (i3 == Integer.MIN_VALUE) {
i3 = this.mExplicitLeft;
}
this.mLeft = i3;
int i4 = this.mEnd;
if (i4 == Integer.MIN_VALUE) {
i4 = this.mExplicitRight;
}
this.mRight = i4;
}
public void setRelative(int i, int i2) {
this.mStart = i;
this.mEnd = i2;
this.mIsRelative = true;
if (this.mIsRtl) {
if (i2 != Integer.MIN_VALUE) {
this.mLeft = i2;
}
if (i != Integer.MIN_VALUE) {
this.mRight = i;
return;
}
return;
}
if (i != Integer.MIN_VALUE) {
this.mLeft = i;
}
if (i2 != Integer.MIN_VALUE) {
this.mRight = i2;
}
}
}