package com.bytedance.sdk.component.adexpress.dynamic.dynamicview;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import android.widget.TextView;

/* JADX INFO: loaded from: classes.dex */
public class vt extends ajl {
    public vt(Context context, DynamicRootView dynamicRootView, com.bytedance.sdk.component.adexpress.dynamic.yz.wu wuVar) {
        super(context, dynamicRootView, wuVar);
        if (com.bytedance.sdk.component.adexpress.yz.ro()) {
            ImageView imageView = new ImageView(context);
            this.fhx = imageView;
            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
            this.wsy = this.wu;
        } else {
            this.fhx = new TextView(context);
        }
        this.fhx.setTag(3);
        addView(this.fhx, getWidgetLayoutParams());
        if (dynamicRootView.getRenderRequest() != null) {
            if (dynamicRootView.getRenderRequest().wu() && dynamicRootView.getRenderRequest().nt()) {
                return;
            }
            this.fhx.setVisibility(8);
            setVisibility(8);
        }
    }

    @Override // com.bytedance.sdk.component.adexpress.dynamic.dynamicview.ajl, com.bytedance.sdk.component.adexpress.dynamic.dynamicview.pkk
    public boolean ef() {
        super.ef();
        if (com.bytedance.sdk.component.adexpress.yz.ro()) {
            Drawable drawableFm = com.bytedance.sdk.component.adexpress.yz.lb.fm(getContext(), this.duv);
            if (drawableFm != null) {
                ((ImageView) this.fhx).setBackground(drawableFm);
            }
            ((ImageView) this.fhx).setScaleType(ImageView.ScaleType.CENTER_INSIDE);
            int iYz = com.bytedance.sdk.component.utils.maa.yz(getContext(), "tt_reward_full_feedback");
            if (iYz > 0) {
                ((ImageView) this.fhx).setImageResource(iYz);
            }
        }
        return true;
    }
}
