package com.bytedance.sdk.component.adexpress.vc;

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.text.TextUtils;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import org.objectweb.asm.Opcodes;
/* loaded from: classes2.dex */
public class qsH extends Ne {
    private ImageView AlY;
    private ImageView Sg;
    private TextView YFl;
    private ImageView tN;
    private AnimatorSet vc;
    private int wN;

    @Override // com.bytedance.sdk.component.adexpress.vc.Ne
    protected void YFl(Context context) {
    }

    public float getAlphaColor() {
        return this.wN;
    }

    public qsH(Context context) {
        super(context);
        this.vc = new AnimatorSet();
        Sg(context);
    }

    private void Sg(Context context) {
        addView(com.bytedance.sdk.component.adexpress.tN.YFl.Sg(context));
        this.Sg = (ImageView) findViewById(2097610751);
        this.tN = (ImageView) findViewById(2097610750);
        this.AlY = (ImageView) findViewById(2097610749);
        this.YFl = (TextView) findViewById(2097610748);
    }

    public void setButtonText(String str) {
        if (this.YFl == null || TextUtils.isEmpty(str)) {
            return;
        }
        this.YFl.setText(str);
    }

    private void AlY() {
        ObjectAnimator ofInt = ObjectAnimator.ofInt(this, "alphaColor", 0, 60);
        ofInt.setInterpolator(new LinearInterpolator());
        ofInt.setDuration(2000L);
        ofInt.setRepeatCount(-1);
        ofInt.start();
    }

    public void setAlphaColor(int i) {
        if (i < 0 || i > 60) {
            return;
        }
        int i2 = i + Opcodes.MONITOREXIT;
        this.AlY.setColorFilter(Color.rgb(i2, i2, i2), PorterDuff.Mode.SRC_IN);
        int i3 = ((i + 20) % 60) + Opcodes.MONITOREXIT;
        this.tN.setColorFilter(Color.rgb(i3, i3, i3), PorterDuff.Mode.SRC_IN);
        int i4 = ((i + 40) % 60) + Opcodes.MONITOREXIT;
        this.Sg.setColorFilter(Color.rgb(i4, i4, i4), PorterDuff.Mode.SRC_IN);
    }

    @Override // com.bytedance.sdk.component.adexpress.vc.Ne
    public void YFl() {
        AlY();
    }

    @Override // com.bytedance.sdk.component.adexpress.vc.Ne
    public void Sg() {
        this.vc.cancel();
    }
}
