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


package com.shizhuang.duapp.modules.creators.dialog;

import android.annotation.SuppressLint;
import android.app.Dialog;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.BaseDialogFragment;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.modules.creators.model.PopWindowModel;
import java.util.HashMap;
import jn.b;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import org.jetbrains.annotations.NotNull;
import t20.n;

@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001:\u0001\u0004B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0005"}, d2 = {"Lcom/shizhuang/duapp/modules/creators/dialog/AllowanceImageDialog;", "Lcom/shizhuang/duapp/common/dialog/BaseDialogFragment;", "<init>", "()V", "a", "du_creators_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: AllowanceImageDialog.kt */
public final class AllowanceImageDialog extends BaseDialogFragment {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull

    /* renamed from: g  reason: collision with root package name */
    public static final a f12258g = new a(null);
    public final Lazy e = LazyKt__LazyJVMKt.lazy(AllowanceImageDialog$mDisposable$2.INSTANCE);
    public HashMap f;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void FragmentMethodWeaver_onCreate(AllowanceImageDialog allowanceImageDialog, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{allowanceImageDialog, bundle}, null, changeQuickRedirect, true, 85058, new Class[]{AllowanceImageDialog.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                AllowanceImageDialog.s(allowanceImageDialog, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (allowanceImageDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceImageDialog")) {
                    b.f34396a.fragmentOnCreateMethod(allowanceImageDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreateView")
        @Keep
        public static View FragmentMethodWeaver_onCreateView(@NonNull AllowanceImageDialog allowanceImageDialog, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{allowanceImageDialog, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 85060, new Class[]{AllowanceImageDialog.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
            if (proxy.isSupported) {
                return (View) proxy.result;
            }
            long currentTimeMillis = System.currentTimeMillis();
            View u4 = AllowanceImageDialog.u(allowanceImageDialog, layoutInflater, viewGroup, bundle);
            long currentTimeMillis2 = System.currentTimeMillis();
            if (allowanceImageDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceImageDialog")) {
                b.f34396a.fragmentOnCreateViewMethod(allowanceImageDialog, currentTimeMillis, currentTimeMillis2);
            }
            return u4;
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void FragmentMethodWeaver_onResume(AllowanceImageDialog allowanceImageDialog) {
            if (!PatchProxy.proxy(new Object[]{allowanceImageDialog}, null, changeQuickRedirect, true, 85061, new Class[]{AllowanceImageDialog.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                AllowanceImageDialog.v(allowanceImageDialog);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (allowanceImageDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceImageDialog")) {
                    b.f34396a.fragmentOnResumeMethod(allowanceImageDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void FragmentMethodWeaver_onStart(AllowanceImageDialog allowanceImageDialog) {
            if (!PatchProxy.proxy(new Object[]{allowanceImageDialog}, null, changeQuickRedirect, true, 85059, new Class[]{AllowanceImageDialog.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                AllowanceImageDialog.t(allowanceImageDialog);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (allowanceImageDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceImageDialog")) {
                    b.f34396a.fragmentOnStartMethod(allowanceImageDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onViewCreated")
        @Keep
        public static void FragmentMethodWeaver_onViewCreated(@NonNull AllowanceImageDialog allowanceImageDialog, @Nullable View view, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{allowanceImageDialog, view, bundle}, null, changeQuickRedirect, true, 85062, new Class[]{AllowanceImageDialog.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                AllowanceImageDialog.w(allowanceImageDialog, view, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (allowanceImageDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceImageDialog")) {
                    b.f34396a.fragmentOnViewCreatedMethod(allowanceImageDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    /* compiled from: AllowanceImageDialog.kt */
    public static final class a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }

        @NotNull
        public final AllowanceImageDialog a(@NotNull PopWindowModel popWindowModel) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{popWindowModel}, this, changeQuickRedirect, false, 85057, new Class[]{PopWindowModel.class}, AllowanceImageDialog.class);
            if (proxy.isSupported) {
                return (AllowanceImageDialog) proxy.result;
            }
            AllowanceImageDialog allowanceImageDialog = new AllowanceImageDialog();
            Bundle bundle = new Bundle();
            bundle.putString("reward", String.valueOf(popWindowModel.getReward()));
            bundle.putString(PushConstants.TITLE, popWindowModel.getTitle());
            bundle.putString(PushConstants.CONTENT, popWindowModel.getContent());
            bundle.putString("headUrl", popWindowModel.getHeadUrl());
            bundle.putString("headText", popWindowModel.getHeadText());
            bundle.putString("rewardText", popWindowModel.getRewardText());
            Unit unit = Unit.INSTANCE;
            allowanceImageDialog.setArguments(bundle);
            return allowanceImageDialog;
        }
    }

    public static void s(AllowanceImageDialog allowanceImageDialog, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, allowanceImageDialog, changeQuickRedirect, false, 85048, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void t(AllowanceImageDialog allowanceImageDialog) {
        if (!PatchProxy.proxy(new Object[0], allowanceImageDialog, changeQuickRedirect, false, 85050, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public static View u(AllowanceImageDialog allowanceImageDialog, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, allowanceImageDialog, changeQuickRedirect, false, 85052, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
        return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
    }

    public static void v(AllowanceImageDialog allowanceImageDialog) {
        if (!PatchProxy.proxy(new Object[0], allowanceImageDialog, changeQuickRedirect, false, 85054, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
        }
    }

    public static void w(AllowanceImageDialog allowanceImageDialog, View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, allowanceImageDialog, changeQuickRedirect, false, 85056, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            super.onViewCreated(view, bundle);
        }
    }

    public View _$_findCachedViewById(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 85045, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.f == null) {
            this.f = new HashMap();
        }
        View view = (View) this.f.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.f.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment
    public void g() {
        Dialog dialog;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85042, new Class[0], Void.TYPE).isSupported && (dialog = getDialog()) != null) {
            Window window = dialog.getWindow();
            if (window != null) {
                WindowManager.LayoutParams attributes = window.getAttributes();
                attributes.width = n.a(275);
                attributes.height = n.a(296);
                window.setAttributes(attributes);
            }
            dialog.setCancelable(false);
            dialog.setCanceledOnTouchOutside(false);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 85047, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 85051, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
        return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
    }

    @Override // androidx.fragment.app.Fragment
    public void onDestroy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85044, new Class[0], Void.TYPE).isSupported) {
            super.onDestroy();
            if (!x().f32364c) {
                x().dispose();
            }
        }
    }

    @Override // androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onDestroyView() {
        HashMap hashMap;
        super.onDestroyView();
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85046, new Class[0], Void.TYPE).isSupported && (hashMap = this.f) != null) {
            hashMap.clear();
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85053, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onResume(this);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85049, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onStart(this);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
    public void onViewCreated(View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 85055, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
    public int q() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85041, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.du_creator_dialog_alllowance_headimage;
    }

    @Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
    @SuppressLint({"SetTextI18n"})
    public void r(@org.jetbrains.annotations.Nullable View view) {
        String str;
        String str2;
        String str3;
        String str4;
        String str5;
        TextView textView;
        String string;
        boolean z = true;
        if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 85043, new Class[]{View.class}, Void.TYPE).isSupported) {
            Bundle arguments = getArguments();
            if (arguments == null || (str = arguments.getString("reward")) == null) {
                str = "0";
            }
            Bundle arguments2 = getArguments();
            String str6 = "";
            if (arguments2 == null || (str2 = arguments2.getString(PushConstants.TITLE)) == null) {
                str2 = str6;
            }
            Bundle arguments3 = getArguments();
            if (arguments3 == null || (str3 = arguments3.getString(PushConstants.CONTENT)) == null) {
                str3 = str6;
            }
            Bundle arguments4 = getArguments();
            if (arguments4 == null || (str4 = arguments4.getString("headUrl")) == null) {
                str4 = str6;
            }
            Bundle arguments5 = getArguments();
            if (arguments5 == null || (str5 = arguments5.getString("headText")) == null) {
                str5 = str6;
            }
            Bundle arguments6 = getArguments();
            if (!(arguments6 == null || (string = arguments6.getString("rewardText")) == null)) {
                str6 = string;
            }
            Typeface c5 = yh.a.e(getContext()).c("HelveticaNeue-CondensedBold.ttf");
            if (!(c5 == null || (textView = (TextView) _$_findCachedViewById(R.id.tvQuota)) == null)) {
                textView.setTypeface(c5);
            }
            ((TextView) _$_findCachedViewById(R.id.tvQuota)).setText(str);
            ((TextView) _$_findCachedViewById(R.id.tvTitle)).setText(str2);
            ((TextView) _$_findCachedViewById(R.id.tvContent)).setText(str3);
            if (str4.length() <= 0) {
                z = false;
            }
            if (z) {
                ((DuImageLoaderView) _$_findCachedViewById(R.id.iv_allowance_head_view)).i(str4).x();
            }
            ((TextView) _$_findCachedViewById(R.id.tv_coupon2)).setText(str5);
            ((TextView) _$_findCachedViewById(R.id.tv_coupon1)).setText(str6);
            ((DuRequestOptions) mn.a.f35714a.g("https://cdn.poizon.com/node-common/5c73d009-3ed3-4aff-256a-5e3686996de7-465-117.png").u(new AllowanceImageDialog$initView$2(this))).y();
            ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBg)).i("https://cdn.poizon.com/node-common/e59ed08b-1fa3-887e-ee9d-54a1600e7a53-825-888.png").x();
            ((TextView) _$_findCachedViewById(R.id.tvKnown)).setOnClickListener(new AllowanceImageDialog$initView$3(this));
        }
    }

    public final fj1.a x() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 85040, new Class[0], fj1.a.class);
        return (fj1.a) (proxy.isSupported ? proxy.result : this.e.getValue());
    }
}