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

149 lines
5.1 KiB
Java
Raw 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.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Property;
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.scb.phone.R;
import o.C14957gcv;
/* loaded from: classes5.dex */
public final class CustomViewInlineProgressAnimation extends LinearLayout {
private AnimatorSet b;
private View d;
@BindView
public ImageView point1;
@BindView
public ImageView point2;
@BindView
public ImageView point3;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CustomViewInlineProgressAnimation(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
C14957gcv.e(context, "");
C14957gcv.e(attributeSet, "");
Object systemService = context.getSystemService("layout_inflater");
C14957gcv.d(systemService, "");
View inflate = ((LayoutInflater) systemService).inflate(R.layout.2131559389, (ViewGroup) this, true);
C14957gcv.c(inflate, "");
this.d = inflate;
this.b = new AnimatorSet();
ButterKnife.c(this);
this.b.cancel();
AnimatorSet animatorSet = new AnimatorSet();
ImageView imageView = this.point1;
ImageView imageView2 = null;
if (imageView == null) {
C14957gcv.a("");
imageView = null;
}
Animator apu_ = apu_(imageView);
ImageView imageView3 = this.point2;
if (imageView3 == null) {
C14957gcv.a("");
imageView3 = null;
}
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(imageView3, (Property<ImageView, Float>) View.ALPHA, 0.3f, 1.0f);
ofFloat.setDuration(500L);
ofFloat.setRepeatCount(-1);
ofFloat.setRepeatMode(2);
C14957gcv.c(ofFloat, "");
ObjectAnimator objectAnimator = ofFloat;
ImageView imageView4 = this.point3;
if (imageView4 == null) {
C14957gcv.a("");
imageView4 = null;
}
Animator apu_2 = apu_(imageView4);
ImageView imageView5 = this.point1;
if (imageView5 == null) {
C14957gcv.a("");
imageView5 = null;
}
Animator apv_ = apv_(imageView5);
ImageView imageView6 = this.point2;
if (imageView6 == null) {
C14957gcv.a("");
imageView6 = null;
}
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(imageView6, PropertyValuesHolder.ofFloat((Property<?, Float>) View.SCALE_X, 1.5f), PropertyValuesHolder.ofFloat((Property<?, Float>) View.SCALE_Y, 1.5f));
ofPropertyValuesHolder.setDuration(500L);
ofPropertyValuesHolder.setRepeatCount(-1);
ofPropertyValuesHolder.setRepeatMode(2);
C14957gcv.c(ofPropertyValuesHolder, "");
ObjectAnimator objectAnimator2 = ofPropertyValuesHolder;
ImageView imageView7 = this.point3;
if (imageView7 != null) {
imageView2 = imageView7;
} else {
C14957gcv.a("");
}
animatorSet.playTogether(apu_, objectAnimator, apu_2, apv_, objectAnimator2, apv_(imageView2));
animatorSet.setInterpolator(new LinearInterpolator());
this.b = animatorSet;
animatorSet.start();
}
/* loaded from: classes5.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
private static Animator apu_(View view) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(view, (Property<View, Float>) View.ALPHA, 1.0f, 0.3f);
ofFloat.setDuration(500L);
ofFloat.setRepeatCount(-1);
ofFloat.setRepeatMode(2);
C14957gcv.c(ofFloat, "");
return ofFloat;
}
private static Animator apv_(View view) {
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(view, PropertyValuesHolder.ofFloat((Property<?, Float>) View.SCALE_X, 0.75f), PropertyValuesHolder.ofFloat((Property<?, Float>) View.SCALE_Y, 0.75f));
ofPropertyValuesHolder.setDuration(500L);
ofPropertyValuesHolder.setRepeatCount(-1);
ofPropertyValuesHolder.setRepeatMode(2);
C14957gcv.c(ofPropertyValuesHolder, "");
return ofPropertyValuesHolder;
}
public final void setPoint3(ImageView imageView) {
C14957gcv.e(imageView, "");
this.point3 = imageView;
}
public final void setPoint2(ImageView imageView) {
C14957gcv.e(imageView, "");
this.point2 = imageView;
}
public final void setPoint1(ImageView imageView) {
C14957gcv.e(imageView, "");
this.point1 = imageView;
}
static {
new IeS((byte) 0);
}
}