what-the-bank/sources/o/Bmx.java

232 lines
9.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.RectF;
import android.util.Xml;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.motion.widget.MotionLayout;
import androidx.core.widget.NestedScrollView;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import o.C3345avm;
import org.xmlpull.v1.XmlPullParser;
/* loaded from: classes.dex */
public final class Bmx {
public float A;
public float B;
public int D;
private int F;
private int H;
private int I;
float a;
float b;
public int d;
public int f;
boolean g;
public float h;
float i;
float j;
public int k;
public boolean m;
public final MotionLayout n;
/* renamed from: o, reason: collision with root package name */
public float f8111o;
public float p;
public int q;
int r;
public float t;
public int v;
public float w;
public float x;
public float y;
public float z;
private static final float[][] E = {new float[]{0.5f, BitmapDescriptorFactory.HUE_RED}, new float[]{BitmapDescriptorFactory.HUE_RED, 0.5f}, new float[]{1.0f, 0.5f}, new float[]{0.5f, 1.0f}, new float[]{0.5f, 0.5f}, new float[]{BitmapDescriptorFactory.HUE_RED, 0.5f}, new float[]{1.0f, 0.5f}};
private static final float[][] C = {new float[]{BitmapDescriptorFactory.HUE_RED, -1.0f}, new float[]{BitmapDescriptorFactory.HUE_RED, 1.0f}, new float[]{-1.0f, BitmapDescriptorFactory.HUE_RED}, new float[]{1.0f, BitmapDescriptorFactory.HUE_RED}, new float[]{-1.0f, BitmapDescriptorFactory.HUE_RED}, new float[]{1.0f, BitmapDescriptorFactory.HUE_RED}};
float l = 0.5f;
float s = 0.5f;
public boolean c = false;
public float[] e = new float[2];
int[] u = new int[2];
/* JADX INFO: Access modifiers changed from: package-private */
public Bmx(Context context, MotionLayout motionLayout, XmlPullParser xmlPullParser) {
this.I = 0;
this.H = 0;
this.k = 0;
this.v = -1;
this.D = -1;
this.F = -1;
this.z = 0.5f;
this.x = 0.5f;
this.r = -1;
this.g = false;
this.A = BitmapDescriptorFactory.HUE_RED;
this.B = 1.0f;
this.f8111o = 4.0f;
this.h = 1.2f;
this.m = true;
this.a = 1.0f;
this.f = 0;
this.b = 10.0f;
this.p = 10.0f;
this.t = 1.0f;
this.y = Float.NaN;
this.w = Float.NaN;
this.q = 0;
this.d = 0;
this.n = motionLayout;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(Xml.asAttributeSet(xmlPullParser), C3345avm.IeS.OnSwipe);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i = 0; i < indexCount; i++) {
int index = obtainStyledAttributes.getIndex(i);
if (index == C3345avm.IeS.OnSwipe_touchAnchorId) {
this.v = obtainStyledAttributes.getResourceId(index, this.v);
} else if (index == C3345avm.IeS.OnSwipe_touchAnchorSide) {
int i2 = obtainStyledAttributes.getInt(index, this.I);
this.I = i2;
float[] fArr = E[i2];
this.x = fArr[0];
this.z = fArr[1];
} else if (index == C3345avm.IeS.OnSwipe_dragDirection) {
int i3 = obtainStyledAttributes.getInt(index, this.H);
this.H = i3;
float[][] fArr2 = C;
if (i3 < fArr2.length) {
float[] fArr3 = fArr2[i3];
this.A = fArr3[0];
this.B = fArr3[1];
} else {
this.B = Float.NaN;
this.A = Float.NaN;
this.g = true;
}
} else if (index == C3345avm.IeS.OnSwipe_maxVelocity) {
this.f8111o = obtainStyledAttributes.getFloat(index, this.f8111o);
} else if (index == C3345avm.IeS.OnSwipe_maxAcceleration) {
this.h = obtainStyledAttributes.getFloat(index, this.h);
} else if (index == C3345avm.IeS.OnSwipe_moveWhenScrollAtTop) {
this.m = obtainStyledAttributes.getBoolean(index, this.m);
} else if (index == C3345avm.IeS.OnSwipe_dragScale) {
this.a = obtainStyledAttributes.getFloat(index, this.a);
} else if (index == C3345avm.IeS.OnSwipe_dragThreshold) {
this.b = obtainStyledAttributes.getFloat(index, this.b);
} else if (index == C3345avm.IeS.OnSwipe_touchRegionId) {
this.D = obtainStyledAttributes.getResourceId(index, this.D);
} else if (index == C3345avm.IeS.OnSwipe_onTouchUp) {
this.k = obtainStyledAttributes.getInt(index, this.k);
} else if (index == C3345avm.IeS.OnSwipe_nestedScrollFlags) {
this.f = obtainStyledAttributes.getInteger(index, 0);
} else if (index == C3345avm.IeS.OnSwipe_limitBoundsTo) {
this.F = obtainStyledAttributes.getResourceId(index, 0);
} else if (index == C3345avm.IeS.OnSwipe_rotationCenterId) {
this.r = obtainStyledAttributes.getResourceId(index, this.r);
} else if (index == C3345avm.IeS.OnSwipe_springDamping) {
this.p = obtainStyledAttributes.getFloat(index, this.p);
} else if (index == C3345avm.IeS.OnSwipe_springMass) {
this.t = obtainStyledAttributes.getFloat(index, this.t);
} else if (index == C3345avm.IeS.OnSwipe_springStiffness) {
this.y = obtainStyledAttributes.getFloat(index, this.y);
} else if (index == C3345avm.IeS.OnSwipe_springStopThreshold) {
this.w = obtainStyledAttributes.getFloat(index, this.w);
} else if (index == C3345avm.IeS.OnSwipe_springBoundary) {
this.q = obtainStyledAttributes.getInt(index, this.q);
} else if (index == C3345avm.IeS.OnSwipe_autoCompleteMode) {
this.d = obtainStyledAttributes.getInt(index, this.d);
}
}
obtainStyledAttributes.recycle();
}
public final void a(boolean z) {
if (z) {
float[][] fArr = C;
fArr[4] = fArr[3];
fArr[5] = fArr[2];
float[][] fArr2 = E;
fArr2[5] = fArr2[2];
fArr2[6] = fArr2[1];
} else {
float[][] fArr3 = C;
fArr3[4] = fArr3[2];
fArr3[5] = fArr3[3];
float[][] fArr4 = E;
fArr4[5] = fArr4[1];
fArr4[6] = fArr4[2];
}
float[] fArr5 = E[this.I];
this.x = fArr5[0];
this.z = fArr5[1];
int i = this.H;
float[][] fArr6 = C;
if (i >= fArr6.length) {
return;
}
float[] fArr7 = fArr6[i];
this.A = fArr7[0];
this.B = fArr7[1];
}
public final void c() {
View view;
int i = this.v;
if (i != -1) {
view = this.n.findViewById(i);
if (view == null) {
C6805ccO.e(this.n.getContext(), this.v);
}
} else {
view = null;
}
if (view instanceof NestedScrollView) {
NestedScrollView nestedScrollView = (NestedScrollView) view;
nestedScrollView.setOnTouchListener(new View.OnTouchListener() { // from class: o.Bmx.1
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view2, MotionEvent motionEvent) {
return false;
}
});
nestedScrollView.setOnScrollChangeListener(new NestedScrollView.RVV() { // from class: o.Bmx.2
@Override // androidx.core.widget.NestedScrollView.RVV
public final void e(NestedScrollView nestedScrollView2, int i2, int i3) {
}
});
}
}
public final RectF la_(ViewGroup viewGroup, RectF rectF) {
View findViewById;
int i = this.D;
if (i == -1 || (findViewById = viewGroup.findViewById(i)) == null) {
return null;
}
rectF.set(findViewById.getLeft(), findViewById.getTop(), findViewById.getRight(), findViewById.getBottom());
return rectF;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final RectF kZ_(ViewGroup viewGroup, RectF rectF) {
View findViewById;
int i = this.F;
if (i == -1 || (findViewById = viewGroup.findViewById(i)) == null) {
return null;
}
rectF.set(findViewById.getLeft(), findViewById.getTop(), findViewById.getRight(), findViewById.getBottom());
return rectF;
}
public final String toString() {
if (Float.isNaN(this.A)) {
return "rotation";
}
StringBuilder sb = new StringBuilder();
sb.append(this.A);
sb.append(" , ");
sb.append(this.B);
return sb.toString();
}
}