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

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Color;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.bytedance.sdk.component.utils.ai;

/* JADX INFO: loaded from: classes.dex */
public class lb extends FrameLayout {
    private AnimatorSet ajl;
    private Context fm;
    private irt jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private ImageView f6444lb;
    private ImageView ro;
    private TextView yz;

    public lb(@NonNull Context context) {
        super(context);
        this.ajl = new AnimatorSet();
        this.fm = context;
        jnr();
        ajl();
    }

    private void ajl() {
        ObjectAnimator objectAnimatorOfFloat = ObjectAnimator.ofFloat(this.f6444lb, "scaleX", 1.0f, 0.9f);
        objectAnimatorOfFloat.setRepeatCount(-1);
        objectAnimatorOfFloat.setInterpolator(new AccelerateDecelerateInterpolator());
        objectAnimatorOfFloat.setRepeatMode(2);
        ObjectAnimator objectAnimatorOfFloat2 = ObjectAnimator.ofFloat(this.f6444lb, "scaleY", 1.0f, 0.9f);
        objectAnimatorOfFloat2.setRepeatCount(-1);
        objectAnimatorOfFloat2.setRepeatMode(2);
        objectAnimatorOfFloat2.setInterpolator(new AccelerateDecelerateInterpolator());
        this.ajl.setDuration(800L);
        this.ajl.playTogether(objectAnimatorOfFloat, objectAnimatorOfFloat2);
    }

    private void jnr() {
        FrameLayout frameLayout = new FrameLayout(this.fm);
        this.jnr = new irt(this.fm);
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams((int) com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.fm, 95.0f), (int) com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.fm, 95.0f));
        layoutParams.gravity = 17;
        frameLayout.addView(this.jnr, layoutParams);
        this.ro = new ImageView(this.fm);
        int iFm = ai.fm(this.fm, 60.0f);
        this.ro.setImageDrawable(com.bytedance.sdk.component.adexpress.yz.wu.fm(1, null, null, new int[]{iFm, iFm}, Integer.valueOf(ai.fm(this.fm, 1.0f)), Integer.valueOf(Color.parseColor("#80FFFFFF"))));
        FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams((int) com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.fm, 75.0f), (int) com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.fm, 75.0f));
        layoutParams2.gravity = 17;
        frameLayout.addView(this.ro, layoutParams2);
        this.f6444lb = new ImageView(this.fm);
        int iFm2 = ai.fm(this.fm, 50.0f);
        this.f6444lb.setImageDrawable(com.bytedance.sdk.component.adexpress.yz.wu.fm(1, Integer.valueOf(Color.parseColor("#80FFFFFF")), null, new int[]{iFm2, iFm2}, null, null));
        FrameLayout.LayoutParams layoutParams3 = new FrameLayout.LayoutParams((int) com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.fm, 63.0f), (int) com.bytedance.sdk.component.adexpress.yz.wsy.fm(this.fm, 63.0f));
        layoutParams3.gravity = 17;
        frameLayout.addView(this.f6444lb, layoutParams3);
        addView(frameLayout);
        TextView textView = new TextView(this.fm);
        this.yz = textView;
        textView.setTextColor(-1);
        this.yz.setMaxLines(1);
        FrameLayout.LayoutParams layoutParams4 = new FrameLayout.LayoutParams(-2, -2);
        layoutParams4.gravity = 81;
        addView(this.yz, layoutParams4);
    }

    public void fm() {
        this.ajl.start();
    }

    public void lb() {
        this.jnr.fm();
    }

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

    public void setGuideText(String str) {
        this.yz.setText(str);
    }

    public void yz() {
        this.jnr.ro();
        this.jnr.lb();
    }
}
