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


package com.shizhuang.duapp.modules.mall_ar.dialogs;

import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Shader;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import co.c;
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.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.BaseDialogFragment;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.widget.font.IconFontTextView;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.mall_ar.model.TigerAvatarPendant;
import com.shizhuang.duapp.modules.mall_ar.utils.ArSpringFestivalHelper;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import o5.i;
import org.jetbrains.annotations.NotNull;

@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/mall_ar/dialogs/ArTigerPendantDialog;", "Lcom/shizhuang/duapp/common/dialog/BaseDialogFragment;", "<init>", "()V", "a", "du_mall_ar_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ArTigerPendantDialog.kt */
public final class ArTigerPendantDialog extends BaseDialogFragment {
    public static ChangeQuickRedirect changeQuickRedirect;
    @NotNull
    public static final a i = new a(null);
    public Function0<Unit> e;
    public ArSpringFestivalHelper f;

    /* renamed from: g  reason: collision with root package name */
    public TigerAvatarPendant f18978g;

    /* renamed from: h  reason: collision with root package name */
    public HashMap f18979h;

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

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

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

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

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

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    /* compiled from: ArTigerPendantDialog.kt */
    public static final class b implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ ArTigerPendantDialog b;

        public b(ArTigerPendantDialog arTigerPendantDialog) {
            this.b = arTigerPendantDialog;
        }

        public final void run() {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 206649, new Class[0], Void.TYPE).isSupported) {
                ArTigerPendantDialog arTigerPendantDialog = this.b;
                if (!PatchProxy.proxy(new Object[0], arTigerPendantDialog, ArTigerPendantDialog.changeQuickRedirect, false, 206627, new Class[0], Void.TYPE).isSupported) {
                    ((TextView) arTigerPendantDialog._$_findCachedViewById(R.id.avatarPendantTitle)).getPaint().setShader(arTigerPendantDialog.x((float) ((TextView) arTigerPendantDialog._$_findCachedViewById(R.id.avatarPendantTitle)).getLineHeight()));
                    ((TextView) arTigerPendantDialog._$_findCachedViewById(R.id.avatarPendantTitle)).invalidate();
                    ((TextView) arTigerPendantDialog._$_findCachedViewById(R.id.avatarPendantContent)).getPaint().setShader(arTigerPendantDialog.x((float) ((TextView) arTigerPendantDialog._$_findCachedViewById(R.id.avatarPendantContent)).getLineHeight()));
                    ((TextView) arTigerPendantDialog._$_findCachedViewById(R.id.avatarPendantContent)).invalidate();
                }
            }
        }
    }

    public static void s(ArTigerPendantDialog arTigerPendantDialog, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, arTigerPendantDialog, changeQuickRedirect, false, 206624, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
            Bundle arguments = arTigerPendantDialog.getArguments();
            arTigerPendantDialog.f18978g = arguments != null ? (TigerAvatarPendant) arguments.getParcelable("data") : null;
        }
    }

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

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

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

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

    @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, 206623, 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, 206636, 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, 206633, new Class[0], Void.TYPE).isSupported && (hashMap = this.f18979h) != null) {
            hashMap.clear();
        }
    }

    @Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.fragment.app.DialogFragment
    public void onDismiss(@NotNull DialogInterface dialogInterface) {
        if (!PatchProxy.proxy(new Object[]{dialogInterface}, this, changeQuickRedirect, false, 206626, new Class[]{DialogInterface.class}, Void.TYPE).isSupported) {
            super.onDismiss(dialogInterface);
            Function0<Unit> function0 = this.e;
            if (function0 != null) {
                function0.invoke();
            }
        }
    }

    @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, 206638, 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, 206634, 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, 206640, 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, 206622, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.dialog_ar_tiger_pendant;
    }

    @Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
    public void r(@org.jetbrains.annotations.Nullable View view) {
        ArSpringFestivalHelper arSpringFestivalHelper;
        if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 206625, new Class[]{View.class}, Void.TYPE).isSupported) {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 206630, new Class[0], Void.TYPE).isSupported && (arSpringFestivalHelper = this.f) != null) {
                arSpringFestivalHelper.g("community_ar_entrance_exposure", "1", "虎年定制头像框");
            }
            ((TextView) _$_findCachedViewById(R.id.avatarPendantTitle)).post(new b(this));
            ViewExtensionKt.h((IconFontTextView) _$_findCachedViewById(R.id.closeIcon), new ArTigerPendantDialog$initView$2(this));
            ViewExtensionKt.h((TextView) _$_findCachedViewById(R.id.shareBtn), new ArTigerPendantDialog$initView$3(this));
            TigerAvatarPendant tigerAvatarPendant = this.f18978g;
            if (tigerAvatarPendant != null) {
                ((DuImageLoaderView) _$_findCachedViewById(R.id.iv_avatar)).i(tigerAvatarPendant.getUserIcon()).o0(true).x();
                c i3 = ((DuImageLoaderView) _$_findCachedViewById(R.id.iv_avatar_pendant)).i(tigerAvatarPendant.getAvatarPendant());
                i3.C = true;
                ((c) i3.e()).x();
                ((DuImageLoaderView) _$_findCachedViewById(R.id.iv_more_gift)).i(tigerAvatarPendant.getBottomImg()).R(2.0f).x();
            }
            ((c) h.b.h(837, 141, ((DuImageLoaderView) _$_findCachedViewById(R.id.ivTop)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/ar_avatar_pendant_bg1.png"))).x();
            ((c) h.b.h(837, 267, ((DuImageLoaderView) _$_findCachedViewById(R.id.ivBottom)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/ar_avatar_pendant_bg3.png"))).x();
            ((c) h.b.h(837, 630, ((DuImageLoaderView) _$_findCachedViewById(R.id.arAvatarPendatImg)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/ar_avatar_pendant_bg2.png"))).x();
        }
    }

    public final Shader x(float f12) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Float(f12)}, this, changeQuickRedirect, false, 206628, new Class[]{Float.TYPE}, Shader.class);
        if (proxy.isSupported) {
            return (Shader) proxy.result;
        }
        return new LinearGradient((float) i.f36333a, (float) i.f36333a, (float) i.f36333a, f12, Color.parseColor("#FFFFFF"), Color.parseColor("#FFDCAD"), Shader.TileMode.REPEAT);
    }
}