package com.scwang.smartrefresh.layout.header.bezierradar;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;
import ඓ.㿎.K.ῲ.ؿ.ඓ.C1404;

public class RippleView extends View {

    /* renamed from: ʬ  reason: contains not printable characters */
    public Paint f3308 = new Paint();

    /* renamed from: ῲ  reason: contains not printable characters */
    public int f3309;

    /* renamed from: 㸾  reason: contains not printable characters */
    public ValueAnimator f3310;

    /* renamed from: com.scwang.smartrefresh.layout.header.bezierradar.RippleView$K  reason: contains not printable characters */
    public class C0563 extends AnimatorListenerAdapter {
        public C0563() {
        }

        public void onAnimationEnd(Animator animator) {
            RippleView.this.setVisibility(8);
        }
    }

    public RippleView(Context context) {
        super(context);
        this.f3308.setAntiAlias(true);
        this.f3308.setColor(-1);
        this.f3308.setStyle(Paint.Style.FILL);
    }

    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        canvas.drawCircle((float) (getWidth() / 2), (float) (getHeight() / 2), (float) this.f3309, this.f3308);
    }

    public void onMeasure(int i, int i2) {
        setMeasuredDimension(View.resolveSize(getSuggestedMinimumWidth(), i), View.resolveSize(getSuggestedMinimumHeight(), i2));
    }

    public void setFrontColor(int i) {
        this.f3308.setColor(i);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m1895() {
        setVisibility(0);
        if (this.f3310 == null) {
            this.f3310 = ValueAnimator.ofInt(0, (int) Math.sqrt(Math.pow((double) getWidth(), 2.0d) + Math.pow((double) getHeight(), 2.0d)));
            this.f3310.setDuration(400L);
            this.f3310.addUpdateListener(new C1404(this));
            this.f3310.addListener(new C0563());
        }
        this.f3310.start();
    }

    /* renamed from: K  reason: contains not printable characters */
    public static /* synthetic */ void m1894(RippleView rippleView, ValueAnimator valueAnimator) {
        rippleView.f3309 = ((Integer) valueAnimator.getAnimatedValue()).intValue();
        rippleView.invalidate();
    }
}
