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

110 lines
3.4 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.AttributeSet;
import android.view.View;
import androidx.core.view.ViewCompat;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
/* loaded from: classes.dex */
public final class gCS extends AbstractC13152fSY {
public gCS(int i) {
b(i);
}
public gCS() {
}
public gCS(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, QXV.e);
b(C2447ael.oy_(obtainStyledAttributes, (XmlResourceParser) attributeSet, "fadingMode", 0, n()));
obtainStyledAttributes.recycle();
}
@Override // o.AbstractC13152fSY, o.VKj
public final void b(PaT paT) {
super.b(paT);
paT.a.put("android:fade:transitionAlpha", Float.valueOf(RHF.e(paT.d)));
}
private Animator AU_(View view, float f, float f2) {
if (f == f2) {
return null;
}
RHF.a(view, f);
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(view, RHF.b, f2);
ofFloat.addListener(new Sts(view));
a(new C17599yDT(this, view) { // from class: o.gCS.3
final gCS b;
final View c;
{
this.b = this;
this.c = view;
}
@Override // o.C17599yDT, o.VKj.Sts
public final void e(VKj vKj) {
RHF.a(this.c, 1.0f);
RHF.d(this.c);
vKj.b(this);
}
});
return ofFloat;
}
@Override // o.AbstractC13152fSY
public final Animator Bx_(View view, PaT paT) {
float f = BitmapDescriptorFactory.HUE_RED;
float b = b(paT, BitmapDescriptorFactory.HUE_RED);
if (b != 1.0f) {
f = b;
}
return AU_(view, f, 1.0f);
}
@Override // o.AbstractC13152fSY
public final Animator By_(View view, PaT paT) {
RHF.c(view);
return AU_(view, b(paT, 1.0f), BitmapDescriptorFactory.HUE_RED);
}
private static float b(PaT paT, float f) {
Float f2;
return (paT == null || (f2 = (Float) paT.a.get("android:fade:transitionAlpha")) == null) ? f : f2.floatValue();
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public static class Sts extends AnimatorListenerAdapter {
private boolean a = false;
private final View b;
Sts(View view) {
this.b = view;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public final void onAnimationStart(Animator animator) {
if (ViewCompat.A(this.b) && this.b.getLayerType() == 0) {
this.a = true;
this.b.setLayerType(2, null);
}
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public final void onAnimationEnd(Animator animator) {
RHF.a(this.b, 1.0f);
if (this.a) {
this.b.setLayerType(0, null);
}
}
}
}