package androidx.swiperefreshlayout.widget;

import android.view.animation.Animation;
import android.view.animation.Transformation;

/* JADX INFO: loaded from: classes.dex */
public final class h extends Animation {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f4330a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ SwipeRefreshLayout f4331b;

    public /* synthetic */ h(SwipeRefreshLayout swipeRefreshLayout, int i10) {
        this.f4330a = i10;
        this.f4331b = swipeRefreshLayout;
    }

    @Override // android.view.animation.Animation
    public final void applyTransformation(float f10, Transformation transformation) {
        int i10 = this.f4330a;
        SwipeRefreshLayout swipeRefreshLayout = this.f4331b;
        switch (i10) {
            case 0:
                int iAbs = !swipeRefreshLayout.mUsingCustomStart ? swipeRefreshLayout.mSpinnerOffsetEnd - Math.abs(swipeRefreshLayout.mOriginalOffsetTop) : swipeRefreshLayout.mSpinnerOffsetEnd;
                swipeRefreshLayout.setTargetOffsetTopAndBottom((swipeRefreshLayout.mFrom + ((int) ((iAbs - r2) * f10))) - swipeRefreshLayout.mCircleView.getTop());
                e eVar = swipeRefreshLayout.mProgress;
                float f11 = 1.0f - f10;
                d dVar = eVar.f4319a;
                if (f11 != dVar.f4310p) {
                    dVar.f4310p = f11;
                }
                eVar.invalidateSelf();
                break;
            case 1:
                float f12 = swipeRefreshLayout.mStartingScale;
                swipeRefreshLayout.setAnimationProgress(((-f12) * f10) + f12);
                swipeRefreshLayout.moveToStart(f10);
                break;
            case 2:
                swipeRefreshLayout.setAnimationProgress(f10);
                break;
            case 3:
                swipeRefreshLayout.setAnimationProgress(1.0f - f10);
                break;
            default:
                swipeRefreshLayout.moveToStart(f10);
                break;
        }
    }
}
