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

import android.content.Context;
import android.text.TextUtils;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;

/* JADX INFO: loaded from: classes.dex */
public class ku extends FrameLayout {
    private final TextView fm;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private final duv f6443lb;
    private final ImageView ro;
    private final RotateAnimation yz;

    public ku(@NonNull Context context) {
        super(context);
        addView(com.bytedance.sdk.component.adexpress.lb.fm.yz(context));
        this.fm = (TextView) findViewById(2097610742);
        this.ro = (ImageView) findViewById(2097610745);
        this.f6443lb = (duv) findViewById(2097610744);
        RotateAnimation rotateAnimation = new RotateAnimation(0.0f, 30.0f, 1, 0.65f, 1, 0.9f);
        this.yz = rotateAnimation;
        rotateAnimation.setDuration(300L);
        rotateAnimation.setRepeatMode(2);
        rotateAnimation.setRepeatCount(1);
        rotateAnimation.setInterpolator(new LinearInterpolator());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public Runnable getHaloAnimation() {
        return new Runnable() { // from class: com.bytedance.sdk.component.adexpress.ajl.ku.1
            @Override // java.lang.Runnable
            public void run() {
                ku.this.ro.startAnimation(ku.this.yz);
                ku.this.postDelayed(new Runnable() { // from class: com.bytedance.sdk.component.adexpress.ajl.ku.1.1
                    @Override // java.lang.Runnable
                    public void run() {
                        ku.this.f6443lb.fm(4);
                    }
                }, 100L);
                ku.this.postDelayed(new Runnable() { // from class: com.bytedance.sdk.component.adexpress.ajl.ku.1.2
                    @Override // java.lang.Runnable
                    public void run() {
                        ku.this.f6443lb.fm(4);
                    }
                }, 300L);
                ku kuVar = ku.this;
                kuVar.postDelayed(kuVar.getHaloAnimation(), 1200L);
            }
        };
    }

    public void setText(String str) {
        if (TextUtils.isEmpty(str)) {
            str = "Slide or click to jump to the details page or third-party application";
        }
        TextView textView = this.fm;
        if (textView != null) {
            textView.setText(str);
        }
    }

    public void fm() {
        postDelayed(getHaloAnimation(), 300L);
    }

    public void ro() {
        this.yz.cancel();
    }
}
