package androidx.swiperefreshlayout.widget; import android.content.Context; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.view.animation.Animation; import android.widget.ImageView; import androidx.core.view.ViewCompat; import o.nMh; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public class CircleImageView extends ImageView { private int a; private Animation.AnimationListener e; /* JADX INFO: Access modifiers changed from: package-private */ public CircleImageView(Context context) { super(context); float f = getContext().getResources().getDisplayMetrics().density; this.a = (int) (3.5f * f); ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape()); ViewCompat.e(this, f * 4.0f); shapeDrawable.getPaint().setColor(-328966); ViewCompat.sn_(this, shapeDrawable); } @Override // android.widget.ImageView, android.view.View protected void onMeasure(int i, int i2) { super.onMeasure(i, i2); } @Override // android.view.View public void onAnimationStart() { super.onAnimationStart(); Animation.AnimationListener animationListener = this.e; if (animationListener != null) { animationListener.onAnimationStart(getAnimation()); } } @Override // android.view.View public void onAnimationEnd() { super.onAnimationEnd(); Animation.AnimationListener animationListener = this.e; if (animationListener != null) { animationListener.onAnimationEnd(getAnimation()); } } public void setBackgroundColorRes(int i) { setBackgroundColor(nMh.getColor(getContext(), i)); } @Override // android.view.View public void setBackgroundColor(int i) { if (getBackground() instanceof ShapeDrawable) { ((ShapeDrawable) getBackground()).getPaint().setColor(i); } } public void setAnimationListener(Animation.AnimationListener animationListener) { this.e = animationListener; } }