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


package com.shizhuang.duapp.modules.live.audience.detail.widget.anniversary;

import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
import android.widget.ImageView;
import android.widget.TextView;
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.extension.ViewExtensionKt;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.live.common.base.BaseFrameLayout;
import hl0.a;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.jvm.JvmOverloads;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(bv = {}, d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u000e\u001a\u00020\r\u0012\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u000f\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0003¢\u0006\u0004\b\u0012\u0010\u0013J\b\u0010\u0004\u001a\u00020\u0003H\u0014R$\u0010\f\u001a\u0004\u0018\u00010\u00058\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0006\u0010\u0007\u001a\u0004\b\b\u0010\t\"\u0004\b\n\u0010\u000b¨\u0006\u0014"}, d2 = {"Lcom/shizhuang/duapp/modules/live/audience/detail/widget/anniversary/AnniversaryFeedbackView;", "Lcom/shizhuang/duapp/modules/live/common/base/BaseFrameLayout;", "", "", "getLayoutId", "Landroid/animation/ObjectAnimator;", "e", "Landroid/animation/ObjectAnimator;", "getScaleAnimatorGone", "()Landroid/animation/ObjectAnimator;", "setScaleAnimatorGone", "(Landroid/animation/ObjectAnimator;)V", "scaleAnimatorGone", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attribute", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_live_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: AnniversaryFeedbackAniView.kt */
public final class AnniversaryFeedbackView extends BaseFrameLayout<Object> {
    public static ChangeQuickRedirect changeQuickRedirect;
    @Nullable
    public ObjectAnimator e;
    public HashMap f;

    @JvmOverloads
    public AnniversaryFeedbackView(@NotNull Context context) {
        this(context, null, 0);
    }

    @Override // com.shizhuang.duapp.modules.live.common.base.BaseFrameLayout
    public void d(@Nullable View view) {
        if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 189084, new Class[]{View.class}, Void.TYPE).isSupported) {
            super.d(view);
            ((DuImageLoaderView) e(R.id.poizonLogo)).g("https://apk.poizon.com/duApp/Android_Config/live/assets/live_bg_fans_anniversary_feedback.png");
            ViewExtensionKt.i((ImageView) e(R.id.close), 1000, new AnniversaryFeedbackView$initView$1(this));
            ViewExtensionKt.j((TextView) e(R.id.acceptGift), 0, new AnniversaryFeedbackView$initView$2(this), 1);
        }
    }

    public View e(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 189093, 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 findViewById = findViewById(i);
        this.f.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void f() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189090, new Class[0], Void.TYPE).isSupported) {
            ((DuImageLoaderView) e(R.id.alphaMaskView)).setVisibility(8);
            setVisibility(8);
            setScaleX(1.0f);
            setScaleY(1.0f);
        }
    }

    @Override // com.shizhuang.duapp.modules.live.common.base.BaseFrameLayout
    public int getLayoutId() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189083, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.anniversary_feedback_anim_view;
    }

    @Nullable
    public final ObjectAnimator getScaleAnimatorGone() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 189086, new Class[0], ObjectAnimator.class);
        return proxy.isSupported ? (ObjectAnimator) proxy.result : this.e;
    }

    public boolean onInterceptTouchEvent(@Nullable MotionEvent motionEvent) {
        ViewParent parent;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{motionEvent}, this, changeQuickRedirect, false, 189091, new Class[]{MotionEvent.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        Integer valueOf = motionEvent != null ? Integer.valueOf(motionEvent.getAction()) : null;
        if (valueOf != null && valueOf.intValue() == 0) {
            ViewParent parent2 = getParent();
            if (parent2 != null) {
                parent2.requestDisallowInterceptTouchEvent(true ^ a.f33089a.Y());
            }
        } else if (!(valueOf == null || valueOf.intValue() != 1 || (parent = getParent()) == null)) {
            parent.requestDisallowInterceptTouchEvent(false);
        }
        return super.onInterceptTouchEvent(motionEvent);
    }

    public boolean onTouchEvent(@NotNull MotionEvent motionEvent) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{motionEvent}, this, changeQuickRedirect, false, 189092, new Class[]{MotionEvent.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        return true;
    }

    public final void setScaleAnimatorGone(@Nullable ObjectAnimator objectAnimator) {
        if (!PatchProxy.proxy(new Object[]{objectAnimator}, this, changeQuickRedirect, false, 189087, new Class[]{ObjectAnimator.class}, Void.TYPE).isSupported) {
            this.e = objectAnimator;
        }
    }

    @JvmOverloads
    public AnniversaryFeedbackView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    @JvmOverloads
    public AnniversaryFeedbackView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
    }
}