得物.apk(点击下载) / AllowanceDialog.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.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/AllowanceDialog;", "Lcom/shizhuang/duapp/common/dialog/BaseDialogFragment;", "<init>", "()V", "a", "du_creators_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: AllowanceDialog.kt */
public final class AllowanceDialog extends BaseDialogFragment {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull
    public static final a f = new a(null);
    public HashMap e;

    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(AllowanceDialog allowanceDialog, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{allowanceDialog, bundle}, null, changeQuickRedirect, true, 85033, new Class[]{AllowanceDialog.class, Bundle.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                AllowanceDialog.s(allowanceDialog, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (allowanceDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceDialog")) {
                    b.f34396a.fragmentOnCreateMethod(allowanceDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
        @Insert(mayCreateSuper = true, value = "onCreateView")
        @Keep
        public static View FragmentMethodWeaver_onCreateView(@NonNull AllowanceDialog allowanceDialog, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{allowanceDialog, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 85035, new Class[]{AllowanceDialog.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
            if (proxy.isSupported) {
                return (View) proxy.result;
            }
            long currentTimeMillis = System.currentTimeMillis();
            View u4 = AllowanceDialog.u(allowanceDialog, layoutInflater, viewGroup, bundle);
            long currentTimeMillis2 = System.currentTimeMillis();
            if (allowanceDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceDialog")) {
                b.f34396a.fragmentOnCreateViewMethod(allowanceDialog, 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(AllowanceDialog allowanceDialog) {
            if (!PatchProxy.proxy(new Object[]{allowanceDialog}, null, changeQuickRedirect, true, 85036, new Class[]{AllowanceDialog.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                AllowanceDialog.v(allowanceDialog);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (allowanceDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.creators.dialog.AllowanceDialog")) {
                    b.f34396a.fragmentOnResumeMethod(allowanceDialog, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

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

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

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

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }

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

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

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

    public static View u(AllowanceDialog allowanceDialog, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, allowanceDialog, changeQuickRedirect, false, 85027, 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(AllowanceDialog allowanceDialog) {
        if (!PatchProxy.proxy(new Object[0], allowanceDialog, changeQuickRedirect, false, 85029, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
        }
    }

    public static void w(AllowanceDialog allowanceDialog, View view, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{view, bundle}, allowanceDialog, changeQuickRedirect, false, 85031, 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, 85020, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.e == null) {
            this.e = new HashMap();
        }
        View view = (View) this.e.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.e.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, 85018, 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(254);
                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, 85022, 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, 85026, 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, 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, 85021, new Class[0], Void.TYPE).isSupported && (hashMap = this.e) != 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, 85028, 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, 85024, 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, 85030, 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, 85017, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.du_creators_dialog_allowance;
    }

    @Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
    @SuppressLint({"SetTextI18n"})
    public void r(@org.jetbrains.annotations.Nullable View view) {
        String str;
        String str2;
        TextView textView;
        String string;
        if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 85019, new Class[]{View.class}, Void.TYPE).isSupported) {
            Bundle arguments = getArguments();
            if (arguments == null || (str = arguments.getString("reward")) == null) {
                str = "0";
            }
            Bundle arguments2 = getArguments();
            String str3 = "";
            if (arguments2 == null || (str2 = arguments2.getString(PushConstants.TITLE)) == null) {
                str2 = str3;
            }
            Bundle arguments3 = getArguments();
            if (!(arguments3 == null || (string = arguments3.getString(PushConstants.CONTENT)) == null)) {
                str3 = 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);
            ((DuRequestOptions) mn.a.f35714a.g("https://cdn.poizon.com/node-common/5c73d009-3ed3-4aff-256a-5e3686996de7-465-117.png").u(new AllowanceDialog$initView$2(this))).y();
            ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBg)).i("https://cdn.poizon.com/node-common/e3286759-7016-c4fa-fb30-178f792f1f61-825-762.png").x();
            ((TextView) _$_findCachedViewById(R.id.tvKnown)).setOnClickListener(new AllowanceDialog$initView$3(this));
        }
    }
}