what-the-bank/sources/com/scb/phone/view/custom/common/CustomViewProgressAnimation...

210 lines
7.4 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.view.custom.common;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.scb.phone.R;
import com.scb.phone.view.custom.common.CustomViewProgressAnimationFull;
import o.C14957gcv;
import o.nMh;
/* loaded from: classes5.dex */
public final class CustomViewProgressAnimationFull extends LinearLayout {
private View b;
@BindView
public ImageView bottomPoint;
public AnimatorSet e;
@BindView
public ImageView leftPoint;
@BindView
public ImageView rightPoint;
@BindView
public ImageView topPoint;
private /* synthetic */ CustomViewProgressAnimationFull(Context context, AttributeSet attributeSet, int i, int i2) {
this(context, attributeSet, (i2 & 4) != 0 ? 0 : i, (byte) 0);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
private CustomViewProgressAnimationFull(Context context, AttributeSet attributeSet, int i, byte b) {
super(context, attributeSet, i, 0);
C14957gcv.e(context, "");
C14957gcv.e(attributeSet, "");
Object systemService = context.getSystemService("layout_inflater");
C14957gcv.d(systemService, "");
View inflate = ((LayoutInflater) systemService).inflate(R.layout.2131559391, (ViewGroup) this, true);
C14957gcv.c(inflate, "");
this.b = inflate;
this.e = new AnimatorSet();
ButterKnife.c(this);
int color = nMh.getColor(getContext(), R.color.f10042131100512);
int color2 = nMh.getColor(getContext(), R.color.f10022131100510);
int color3 = nMh.getColor(getContext(), R.color.f10012131100509);
int color4 = nMh.getColor(getContext(), R.color.f10032131100511);
this.e.cancel();
AnimatorSet animatorSet = new AnimatorSet();
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "rotation", BitmapDescriptorFactory.HUE_RED, 90.0f);
ofFloat.setDuration(1000L);
ofFloat.setRepeatCount(-1);
ofFloat.setRepeatMode(-1);
ObjectAnimator objectAnimator = ofFloat;
ImageView imageView = this.topPoint;
ImageView imageView2 = null;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
Animator apy_ = apy_(imageView, "translationY", 10.0f);
ImageView imageView3 = this.leftPoint;
if (imageView3 == null) {
C14957gcv.a("");
imageView3 = null;
}
Animator apy_2 = apy_(imageView3, "translationX", 10.0f);
ImageView imageView4 = this.rightPoint;
if (imageView4 == null) {
C14957gcv.a("");
imageView4 = null;
}
Animator apy_3 = apy_(imageView4, "translationX", -10.0f);
ImageView imageView5 = this.bottomPoint;
if (imageView5 == null) {
C14957gcv.a("");
imageView5 = null;
}
Animator apy_4 = apy_(imageView5, "translationY", -10.0f);
ImageView imageView6 = this.topPoint;
if (imageView6 == null) {
C14957gcv.a("");
imageView6 = null;
}
Animator apx_ = apx_(imageView6, color, color4);
ImageView imageView7 = this.leftPoint;
if (imageView7 == null) {
C14957gcv.a("");
imageView7 = null;
}
Animator apx_2 = apx_(imageView7, color2, color);
ImageView imageView8 = this.rightPoint;
if (imageView8 == null) {
C14957gcv.a("");
imageView8 = null;
}
Animator apx_3 = apx_(imageView8, color4, color3);
ImageView imageView9 = this.bottomPoint;
if (imageView9 != null) {
imageView2 = imageView9;
} else {
C14957gcv.a("");
}
animatorSet.playTogether(objectAnimator, apy_, apy_2, apy_3, apy_4, apx_, apx_2, apx_3, apx_(imageView2, color3, color2));
animatorSet.setInterpolator(new LinearInterpolator());
this.e = animatorSet;
animatorSet.start();
}
/* loaded from: classes5.dex */
public static final class LWm {
private LWm() {
}
public /* synthetic */ LWm(byte b) {
this();
}
}
private static Animator apy_(ImageView imageView, String str, float f) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(imageView, str, -f);
ofFloat.setDuration(500L);
ofFloat.setRepeatMode(2);
ofFloat.setRepeatCount(-1);
return ofFloat;
}
private static Animator apx_(final ImageView imageView, int i, int i2) {
ValueAnimator valueAnimator = new ValueAnimator();
valueAnimator.setIntValues(i, i2);
valueAnimator.setEvaluator(new ArgbEvaluator());
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(imageView) { // from class: o.eCm
private ImageView e;
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator2) {
CustomViewProgressAnimationFull.apw_(this.e, valueAnimator2);
}
{
this.e = imageView;
}
});
valueAnimator.setDuration(1000L);
valueAnimator.setRepeatCount(-1);
return valueAnimator;
}
public static /* synthetic */ void apw_(ImageView imageView, ValueAnimator valueAnimator) {
C14957gcv.e(imageView, "");
C14957gcv.e(valueAnimator, "");
Drawable background = imageView.getBackground();
Object animatedValue = valueAnimator.getAnimatedValue();
C14957gcv.d(animatedValue, "");
background.setTint(((Integer) animatedValue).intValue());
}
public final void setTopPoint(ImageView imageView) {
C14957gcv.e(imageView, "");
this.topPoint = imageView;
}
public final void setRightPoint(ImageView imageView) {
C14957gcv.e(imageView, "");
this.rightPoint = imageView;
}
public final void setLeftPoint(ImageView imageView) {
C14957gcv.e(imageView, "");
this.leftPoint = imageView;
}
public final void setBottomPoint(ImageView imageView) {
C14957gcv.e(imageView, "");
this.bottomPoint = imageView;
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public CustomViewProgressAnimationFull(Context context, AttributeSet attributeSet, int i) {
this(context, attributeSet, i, 8);
C14957gcv.e(context, "");
C14957gcv.e(attributeSet, "");
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public CustomViewProgressAnimationFull(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0, 12);
C14957gcv.e(context, "");
C14957gcv.e(attributeSet, "");
}
static {
new LWm((byte) 0);
}
}