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

131 lines
5.0 KiB
Java

package o;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.util.Property;
import android.view.View;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.kofax.mobile.sdk._internal.impl.extraction.rtti.RttiJsonExactionHelper;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes2.dex */
public abstract class Ctt implements rip {
private final ArrayList<Animator.AnimatorListener> a = new ArrayList<>();
final ExtendedFloatingActionButton b;
private qXa c;
private qXa d;
private final Context e;
private final C2327acX i;
public Ctt(ExtendedFloatingActionButton extendedFloatingActionButton, C2327acX c2327acX) {
this.b = extendedFloatingActionButton;
this.e = extendedFloatingActionButton.getContext();
this.i = c2327acX;
}
public final qXa b() {
qXa qxa = this.c;
if (qxa != null) {
return qxa;
}
if (this.d == null) {
this.d = qXa.b(this.e, h());
}
return this.d;
}
@Override // o.rip
public AnimatorSet JG_() {
return IZ_(b());
}
public final AnimatorSet IZ_(qXa qxa) {
ArrayList arrayList = new ArrayList();
if (qxa.e.get("opacity") != null) {
arrayList.add(qxa.HF_("opacity", this.b, View.ALPHA));
}
if (qxa.e.get("scale") != null) {
arrayList.add(qxa.HF_("scale", this.b, View.SCALE_Y));
arrayList.add(qxa.HF_("scale", this.b, View.SCALE_X));
}
if (qxa.e.get(RttiJsonExactionHelper.WIDTH) != null) {
arrayList.add(qxa.HF_(RttiJsonExactionHelper.WIDTH, this.b, ExtendedFloatingActionButton.h));
}
if (qxa.e.get(RttiJsonExactionHelper.HEIGHT) != null) {
arrayList.add(qxa.HF_(RttiJsonExactionHelper.HEIGHT, this.b, ExtendedFloatingActionButton.f));
}
if (qxa.e.get("paddingStart") != null) {
arrayList.add(qxa.HF_("paddingStart", this.b, ExtendedFloatingActionButton.i));
}
if (qxa.e.get("paddingEnd") != null) {
arrayList.add(qxa.HF_("paddingEnd", this.b, ExtendedFloatingActionButton.g));
}
if (qxa.e.get("labelOpacity") != null) {
arrayList.add(qxa.HF_("labelOpacity", this.b, new Property<ExtendedFloatingActionButton, Float>(this, Float.class, "LABEL_OPACITY_PROPERTY") { // from class: o.Ctt.2
private Ctt a;
{
this.a = this;
}
@Override // android.util.Property
public final /* synthetic */ Float get(ExtendedFloatingActionButton extendedFloatingActionButton) {
ExtendedFloatingActionButton extendedFloatingActionButton2 = extendedFloatingActionButton;
return Float.valueOf(((Color.alpha(extendedFloatingActionButton2.getCurrentTextColor()) / 255.0f) / Color.alpha(extendedFloatingActionButton2.s.getColorForState(extendedFloatingActionButton2.getDrawableState(), this.a.b.s.getDefaultColor()))) + BitmapDescriptorFactory.HUE_RED);
}
@Override // android.util.Property
public final /* synthetic */ void set(ExtendedFloatingActionButton extendedFloatingActionButton, Float f) {
ExtendedFloatingActionButton extendedFloatingActionButton2 = extendedFloatingActionButton;
Float f2 = f;
int colorForState = extendedFloatingActionButton2.s.getColorForState(extendedFloatingActionButton2.getDrawableState(), this.a.b.s.getDefaultColor());
ColorStateList valueOf = ColorStateList.valueOf(Color.argb((int) (((f2.floatValue() * (Color.alpha(colorForState) / 255.0f)) + BitmapDescriptorFactory.HUE_RED) * 255.0f), Color.red(colorForState), Color.green(colorForState), Color.blue(colorForState)));
if (f2.floatValue() == 1.0f) {
extendedFloatingActionButton2.Jc_(extendedFloatingActionButton2.s);
} else {
extendedFloatingActionButton2.Jc_(valueOf);
}
}
}));
}
AnimatorSet animatorSet = new AnimatorSet();
vnt.HC_(animatorSet, arrayList);
return animatorSet;
}
@Override // o.rip
public void c() {
this.i.d = null;
}
@Override // o.rip
public void a() {
this.i.d = null;
}
@Override // o.rip
public void JH_(Animator animator) {
C2327acX c2327acX = this.i;
Animator animator2 = c2327acX.d;
if (animator2 != null) {
animator2.cancel();
}
c2327acX.d = animator;
}
@Override // o.rip
public final void b(qXa qxa) {
this.c = qxa;
}
@Override // o.rip
public final List<Animator.AnimatorListener> d() {
return this.a;
}
}