package com.scwang.smartrefresh.layout.footer;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import com.scwang.smartrefresh.layout.R$styleable;
import com.scwang.smartrefresh.layout.constant.RefreshState;
import com.scwang.smartrefresh.layout.constant.SpinnerStyle;
import com.scwang.smartrefresh.layout.footer.ballpulse.BallPulseView;
import ඓ.㿎.K.ῲ.Ԕ.AbstractC1396;
import ඓ.㿎.K.ῲ.Ԕ.AbstractC1400;
import ඓ.㿎.K.ῲ.Ԕ.AbstractC1401;
import ඓ.㿎.K.ῲ.䀟.C1436;
import ῲ.ᨨ.ʬ.C1718;

public class BallPulseFooter extends ViewGroup implements AbstractC1400 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public SpinnerStyle f3280 = SpinnerStyle.Translate;

    /* renamed from: ῲ  reason: contains not printable characters */
    public BallPulseView f3281;

    public BallPulseFooter(Context context) {
        super(context);
        m1856(context, null);
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1399
    public SpinnerStyle getSpinnerStyle() {
        return this.f3280;
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1399
    public View getView() {
        return this;
    }

    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        int measuredWidth = getMeasuredWidth();
        int measuredHeight = getMeasuredHeight();
        int measuredWidth2 = this.f3281.getMeasuredWidth();
        int measuredHeight2 = this.f3281.getMeasuredHeight();
        int i5 = (measuredWidth / 2) - (measuredWidth2 / 2);
        int i6 = (measuredHeight / 2) - (measuredHeight2 / 2);
        this.f3281.layout(i5, i6, measuredWidth2 + i5, measuredHeight2 + i6);
    }

    public void onMeasure(int i, int i2) {
        this.f3281.measure(View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i), Integer.MIN_VALUE), View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i2), Integer.MIN_VALUE));
        setMeasuredDimension(ViewGroup.resolveSize(this.f3281.getMeasuredWidth(), i), ViewGroup.resolveSize(this.f3281.getMeasuredHeight(), i2));
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1399
    public void setPrimaryColors(int... iArr) {
        if (iArr.length > 1) {
            this.f3281.setNormalColor(iArr[1]);
            this.f3281.setAnimatingColor(iArr[0]);
        } else if (iArr.length > 0) {
            this.f3281.setNormalColor(C1718.m4411(-1711276033, iArr[0]));
            this.f3281.setAnimatingColor(iArr[0]);
        }
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1400
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m1855(float f, int i, int i2, int i3) {
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m1856(Context context, AttributeSet attributeSet) {
        this.f3281 = new BallPulseView(context);
        addView(this.f3281, -2, -2);
        setMinimumHeight(C1436.m3649(60.0f));
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.BallPulseFooter);
        int color = obtainStyledAttributes.getColor(R$styleable.BallPulseFooter_srlPrimaryColor, 0);
        int color2 = obtainStyledAttributes.getColor(R$styleable.BallPulseFooter_srlAccentColor, 0);
        if (color != 0) {
            this.f3281.setAnimatingColor(color);
        }
        if (color2 != 0) {
            this.f3281.setNormalColor(color);
        }
        this.f3280 = SpinnerStyle.values()[obtainStyledAttributes.getInt(R$styleable.BallPulseFooter_srlClassicsSpinnerStyle, this.f3280.ordinal())];
        obtainStyledAttributes.recycle();
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1399
    /* renamed from: K  reason: contains not printable characters */
    public void m1857(AbstractC1396 r1, int i, int i2) {
    }

    @Override // ඓ.㿎.K.ῲ.ݜ.AbstractC1408
    /* renamed from: K  reason: contains not printable characters */
    public void m1860(AbstractC1401 r1, RefreshState refreshState, RefreshState refreshState2) {
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1400
    /* renamed from: 㸾  reason: contains not printable characters */
    public void m1861(float f, int i, int i2, int i3) {
    }

    public BallPulseFooter(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        m1856(context, attributeSet);
    }

    public BallPulseFooter(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        m1856(context, attributeSet);
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1399
    /* renamed from: K  reason: contains not printable characters */
    public void m1859(AbstractC1401 r1, int i, int i2) {
        this.f3281.m1871();
    }

    @Override // ඓ.㿎.K.ῲ.Ԕ.AbstractC1399
    /* renamed from: K  reason: contains not printable characters */
    public void m1858(AbstractC1401 r1) {
        this.f3281.m1870();
    }
}
