得物.apk(点击下载) / ProtocolUpdateTipDialog.java


package com.shizhuang.duapp.modules.du_mall_common.noback.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatDialog;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.du_mall_common.noback.model.FocusItem;
import com.shizhuang.duapp.modules.du_mall_common.noback.model.ProtocolType;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt__CollectionsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import t50.f;

@Metadata(bv = {}, d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001¨\u0006\u0002"}, d2 = {"Lcom/shizhuang/duapp/modules/du_mall_common/noback/dialog/ProtocolUpdateTipDialog;", "Landroidx/appcompat/app/AppCompatDialog;", "du_mall_common_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ProtocolUpdateTipDialog.kt */
public final class ProtocolUpdateTipDialog extends AppCompatDialog {
    public static ChangeQuickRedirect changeQuickRedirect;
    public final List<FocusItem> b;
    @NotNull

    /* renamed from: c  reason: collision with root package name */
    public final ProtocolType f13514c;

    public ProtocolUpdateTipDialog(@NotNull Context context, @Nullable List<FocusItem> list, @NotNull ProtocolType protocolType) {
        super(context, R.style.CustomDialog);
        this.b = list;
        this.f13514c = protocolType;
    }

    @Override // androidx.appcompat.app.AppCompatDialog
    public void onCreate(@Nullable Bundle bundle) {
        TextView textView;
        TextView textView2;
        DuImageLoaderView duImageLoaderView;
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 121506, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
            setContentView(R.layout.dialog_protocol_update);
            if (this.f13514c == ProtocolType.TYPE_LIGHTNING) {
                ((DuImageLoaderView) findViewById(R.id.tipImg)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/image_online/plugin/bg_apply_update_head.png").x();
            } else {
                ((DuImageLoaderView) findViewById(R.id.tipImg)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/image_online/plugin/bg_protocol_update_head.png").x();
            }
            ((DuImageLoaderView) findViewById(R.id.dlCloseDialog)).setOnClickListener(new ProtocolUpdateTipDialog$onCreate$1(this));
            List listOf = CollectionsKt__CollectionsKt.listOf((Object[]) new f[]{new f((TextView) findViewById(R.id.tvAvoidReturnTip), (TextView) findViewById(R.id.tvAvoidReturnTipDetail), (DuImageLoaderView) findViewById(R.id.duImgAvoidReturn)), new f((TextView) findViewById(R.id.tvSavingTimeTip), (TextView) findViewById(R.id.tvSavingTimeTipDetail), (DuImageLoaderView) findViewById(R.id.duImgSavingTime)), new f((TextView) findViewById(R.id.tvLowRateTip), (TextView) findViewById(R.id.tvLowRateTipDetail), (DuImageLoaderView) findViewById(R.id.duImgLowRate))});
            List<FocusItem> list = this.b;
            if (list != null) {
                int i = 0;
                for (T t : list) {
                    f fVar = (f) listOf.get(i);
                    PatchProxyResult proxy = PatchProxy.proxy(new Object[0], fVar, f.changeQuickRedirect, false, 121510, new Class[0], TextView.class);
                    if (proxy.isSupported) {
                        textView = (TextView) proxy.result;
                    } else {
                        textView = fVar.f38354a;
                    }
                    String title = t.getTitle();
                    String str = "";
                    if (title == null) {
                        title = str;
                    }
                    textView.setText(title);
                    f fVar2 = (f) listOf.get(i);
                    PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], fVar2, f.changeQuickRedirect, false, 121511, new Class[0], TextView.class);
                    if (proxy2.isSupported) {
                        textView2 = (TextView) proxy2.result;
                    } else {
                        textView2 = fVar2.b;
                    }
                    String content = t.getContent();
                    if (content != null) {
                        str = content;
                    }
                    textView2.setText(str);
                    t.getIcon();
                    f fVar3 = (f) listOf.get(i);
                    PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], fVar3, f.changeQuickRedirect, false, 121512, new Class[0], DuImageLoaderView.class);
                    if (proxy3.isSupported) {
                        duImageLoaderView = (DuImageLoaderView) proxy3.result;
                    } else {
                        duImageLoaderView = fVar3.f38355c;
                    }
                    duImageLoaderView.i(t.getIcon()).x();
                    i++;
                }
            }
        }
    }

    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 121507, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
            Window window = getWindow();
            if (window != null) {
                window.setGravity(17);
                window.setWindowAnimations(R.style.BottomDialogsAnimation);
                window.getDecorView().setPadding(0, 0, 0, 0);
                window.setLayout(-2, -2);
            }
        }
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public ProtocolUpdateTipDialog(Context context, List list, ProtocolType protocolType, int i) {
        super(context, R.style.CustomDialog);
        ProtocolType protocolType2 = (i & 4) != 0 ? ProtocolType.TYPE_CUSTOM : null;
        this.b = list;
        this.f13514c = protocolType2;
    }
}