得物.apk(点击下载) / ChannelHotPictureView.java
package com.shizhuang.duapp.modules.mall_dynamic.channel.views;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.notification.model.NotifyType;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.component.module.IModuleExposureObserver;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.ui.view.ProductImageLoaderView;
import com.shizhuang.duapp.common.widget.font.FontText;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.du_mall_common.extension.LifecycleExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.utils.IViewAppearObserver;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.ChannelHotPictureItemModel;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.ChannelHotPictureModel;
import com.youth.banner.Banner;
import com.youth.banner.adapter.BannerAdapter;
import com.youth.banner.indicator.CircleIndicator;
import com.youth.banner.listener.OnBannerListener;
import com.youth.banner.listener.OnPageScrollStateChangedListener;
import com.youth.banner.listener.OnPageScrolledListener;
import com.youth.banner.listener.OnPageSelectedListener;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.CancellationException;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.JvmOverloads;
import kotlinx.android.extensions.LayoutContainer;
import kotlinx.coroutines.Job;
import o5.i;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u00032\u00020\u0004:\u0002\u0014\u0015B'\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\u0005¢\u0006\u0004\b\u0012\u0010\u0013J\b\u0010\u0006\u001a\u00020\u0005H\u0016R\u001b\u0010\f\u001a\u00020\u00078BX\u0002¢\u0006\f\n\u0004\b\b\u0010\t\u001a\u0004\b\n\u0010\u000b¨\u0006\u0016"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/BaseChannelView;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/model/ChannelHotPictureModel;", "Lcom/shizhuang/duapp/common/component/module/IModuleExposureObserver;", "Lcom/shizhuang/duapp/modules/du_mall_common/utils/IViewAppearObserver;", "", "getLayoutId", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPicAnimHelper;", NotifyType.LIGHTS, "Lkotlin/Lazy;", "getAnimHelper", "()Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPicAnimHelper;", "animHelper", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "e", "VogueBigImgBannerAdapter", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ChannelHotPictureView.kt */
public final class ChannelHotPictureView extends BaseChannelView<ChannelHotPictureModel> implements IModuleExposureObserver, IViewAppearObserver {
public static ChangeQuickRedirect changeQuickRedirect;
public boolean f;
/* renamed from: g reason: collision with root package name */
public final VogueBigImgBannerAdapter f19337g;
/* renamed from: h reason: collision with root package name */
public float f19338h;
public int i;
public int j;
public Job k;
public final Lazy l;
public HashMap m;
@Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001:\u0001\u0006B\u0007¢\u0006\u0004\b\u0004\u0010\u0005¨\u0006\u0007"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView$VogueBigImgBannerAdapter;", "Lcom/youth/banner/adapter/BannerAdapter;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/model/ChannelHotPictureItemModel;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView$VogueBigImgBannerAdapter$VogueBigImgBannerViewHolder;", "<init>", "()V", "VogueBigImgBannerViewHolder", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ChannelHotPictureView.kt */
public static final class VogueBigImgBannerAdapter extends BannerAdapter<ChannelHotPictureItemModel, VogueBigImgBannerViewHolder> {
public static ChangeQuickRedirect changeQuickRedirect;
@Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u00012\u00020\u0002¨\u0006\u0003"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView$VogueBigImgBannerAdapter$VogueBigImgBannerViewHolder;", "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;", "Lkotlinx/android/extensions/LayoutContainer;", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ChannelHotPictureView.kt */
public static final class VogueBigImgBannerViewHolder extends RecyclerView.ViewHolder implements LayoutContainer {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public final View b;
public VogueBigImgBannerViewHolder(@NotNull View view) {
super(view);
this.b = view;
}
@Override // kotlinx.android.extensions.LayoutContainer
@NotNull
public View getContainerView() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211781, new Class[0], View.class);
return proxy.isSupported ? (View) proxy.result : this.b;
}
}
@Override // com.youth.banner.holder.IViewHolder
public void onBindView(Object obj, Object obj2, int i, int i3) {
Object[] objArr = {(VogueBigImgBannerViewHolder) obj, (ChannelHotPictureItemModel) obj2, new Integer(i), new Integer(i3)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Integer.TYPE;
boolean z = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 211780, new Class[]{VogueBigImgBannerViewHolder.class, ChannelHotPictureItemModel.class, cls, cls}, Void.TYPE).isSupported;
}
@Override // com.youth.banner.holder.IViewHolder
public Object onCreateHolder(ViewGroup viewGroup, int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{viewGroup, new Integer(i)}, this, changeQuickRedirect, false, 211779, new Class[]{ViewGroup.class, Integer.TYPE}, VogueBigImgBannerViewHolder.class);
if (proxy.isSupported) {
return (VogueBigImgBannerViewHolder) proxy.result;
}
return new VogueBigImgBannerViewHolder(ViewExtensionKt.w(viewGroup, R.layout.item_mall_vogue_product_card, false, 2));
}
}
/* compiled from: ChannelHotPictureView.kt */
public static final class a<T> implements OnBannerListener<ChannelHotPictureItemModel> {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ChannelHotPictureView f19339a;
public final /* synthetic */ Context b;
public a(ChannelHotPictureView channelHotPictureView, Context context) {
this.f19339a = channelHotPictureView;
this.b = context;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, int] */
@Override // com.youth.banner.listener.OnBannerListener
public void OnBannerClick(ChannelHotPictureItemModel channelHotPictureItemModel, int i) {
ChannelHotPictureItemModel channelHotPictureItemModel2 = channelHotPictureItemModel;
if (!PatchProxy.proxy(new Object[]{channelHotPictureItemModel2, new Integer(i)}, this, changeQuickRedirect, false, 211770, new Class[]{ChannelHotPictureItemModel.class, Integer.TYPE}, Void.TYPE).isSupported) {
u91.c.c().a(channelHotPictureItemModel2.getRedirect()).f(this.b);
BaseChannelView.i(this.f19339a, null, channelHotPictureItemModel2.getTrack(), 1, null);
}
}
}
/* compiled from: ChannelHotPictureView.kt */
public static final class b implements OnPageScrollStateChangedListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ChannelHotPictureView f19340a;
public b(ChannelHotPictureView channelHotPictureView) {
this.f19340a = channelHotPictureView;
}
@Override // com.youth.banner.listener.OnPageScrollStateChangedListener
public final void onPageScrollStateChanged(int i) {
float f;
float f12;
float f13;
float f14;
if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 211771, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
if (i == 0) {
ChannelHotPictureView channelHotPictureView = this.f19340a;
ChangeQuickRedirect changeQuickRedirect2 = ChannelHotPictureView.changeQuickRedirect;
if (channelHotPictureView.n(true)) {
ChannelHotPicAnimHelper animHelper = this.f19340a.getAnimHelper();
if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211686, new Class[0], Void.TYPE).isSupported) {
animHelper.b();
if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211693, new Class[0], Void.TYPE).isSupported) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat((FontText) animHelper.a(R.id.mainTitle), View.TRANSLATION_X, animHelper.c(), 0.0f);
ofFloat.setInterpolator(new OvershootInterpolator(1.0f));
ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat((FontText) animHelper.a(R.id.mainTitle), View.ALPHA, i.f36333a, 1.0f);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ofFloat, ofFloat2);
animatorSet.setDuration(700L);
animatorSet.start();
animHelper.e.add(animatorSet);
}
if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211694, new Class[0], Void.TYPE).isSupported) {
LinearLayout linearLayout = (LinearLayout) animHelper.a(R.id.subTitleTv);
Property property = View.TRANSLATION_X;
float[] fArr = new float[2];
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211683, new Class[0], Float.TYPE);
if (proxy.isSupported) {
f12 = ((Float) proxy.result).floatValue();
} else {
f12 = animHelper.c();
}
fArr[0] = f12;
fArr[1] = 0.0f;
ObjectAnimator ofFloat3 = ObjectAnimator.ofFloat(linearLayout, property, fArr);
ofFloat3.setInterpolator(new OvershootInterpolator(1.0f));
ObjectAnimator ofFloat4 = ObjectAnimator.ofFloat((LinearLayout) animHelper.a(R.id.subTitleTv), View.ALPHA, i.f36333a, 1.0f);
AnimatorSet animatorSet2 = new AnimatorSet();
animatorSet2.playTogether(ofFloat3, ofFloat4);
animatorSet2.setStartDelay(170);
animatorSet2.setDuration(700L);
animatorSet2.start();
animHelper.f19329g = animatorSet2;
}
if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211695, new Class[0], Void.TYPE).isSupported) {
ProductImageLoaderView productImageLoaderView = (ProductImageLoaderView) animHelper.a(R.id.imgLogo);
Property property2 = View.TRANSLATION_X;
float[] fArr2 = new float[2];
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211685, new Class[0], Float.TYPE);
if (proxy2.isSupported) {
f = ((Float) proxy2.result).floatValue();
} else {
f = !animHelper.b ? -150.0f : 100.0f;
}
fArr2[0] = f;
fArr2[1] = 0.0f;
ObjectAnimator ofFloat5 = ObjectAnimator.ofFloat(productImageLoaderView, property2, fArr2);
ofFloat5.setInterpolator(new OvershootInterpolator(1.8f));
ObjectAnimator ofFloat6 = ObjectAnimator.ofFloat((ProductImageLoaderView) animHelper.a(R.id.imgLogo), View.ALPHA, i.f36333a, 1.0f);
AnimatorSet animatorSet3 = new AnimatorSet();
animatorSet3.playTogether(ofFloat5, ofFloat6);
animatorSet3.setDuration(330L);
animatorSet3.addListener(new nr0.e(animHelper, ofFloat5, ofFloat6));
animatorSet3.start();
animHelper.e.add(animatorSet3);
}
ObjectAnimator objectAnimator = animHelper.d;
if (objectAnimator != null) {
objectAnimator.resume();
}
}
}
} else if (i == 2) {
ChannelHotPictureView channelHotPictureView2 = this.f19340a;
ChangeQuickRedirect changeQuickRedirect3 = ChannelHotPictureView.changeQuickRedirect;
channelHotPictureView2.n(true);
ChannelHotPicAnimHelper animHelper2 = this.f19340a.getAnimHelper();
if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211687, new Class[0], Void.TYPE).isSupported) {
animHelper2.b();
if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211690, new Class[0], Void.TYPE).isSupported) {
ObjectAnimator ofFloat7 = ObjectAnimator.ofFloat((FontText) animHelper2.a(R.id.mainTitle), View.TRANSLATION_X, 0.0f, animHelper2.d());
ofFloat7.setInterpolator(new LinearInterpolator());
ObjectAnimator ofFloat8 = ObjectAnimator.ofFloat((FontText) animHelper2.a(R.id.mainTitle), View.ALPHA, 1.0f, i.f36333a);
AnimatorSet animatorSet4 = new AnimatorSet();
animatorSet4.playTogether(ofFloat7, ofFloat8);
animatorSet4.setDuration(500L);
animatorSet4.start();
animHelper2.f.add(animatorSet4);
}
if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211691, new Class[0], Void.TYPE).isSupported) {
LinearLayout linearLayout2 = (LinearLayout) animHelper2.a(R.id.subTitleTv);
Property property3 = View.TRANSLATION_X;
float[] fArr3 = new float[2];
fArr3[0] = 0.0f;
PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211682, new Class[0], Float.TYPE);
if (proxy3.isSupported) {
f14 = ((Float) proxy3.result).floatValue();
} else {
f14 = animHelper2.d();
}
fArr3[1] = f14;
ObjectAnimator ofFloat9 = ObjectAnimator.ofFloat(linearLayout2, property3, fArr3);
ofFloat9.setInterpolator(new LinearInterpolator());
ObjectAnimator ofFloat10 = ObjectAnimator.ofFloat((LinearLayout) animHelper2.a(R.id.subTitleTv), View.ALPHA, 1.0f, i.f36333a);
AnimatorSet animatorSet5 = new AnimatorSet();
animatorSet5.playTogether(ofFloat9, ofFloat10);
animatorSet5.setStartDelay(150);
animatorSet5.setDuration(600L);
animatorSet5.start();
animHelper2.f19330h = animatorSet5;
}
if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211692, new Class[0], Void.TYPE).isSupported) {
ObjectAnimator objectAnimator2 = animHelper2.f19328c;
if (objectAnimator2 != null) {
objectAnimator2.cancel();
}
ProductImageLoaderView productImageLoaderView2 = (ProductImageLoaderView) animHelper2.a(R.id.imgLogo);
Property property4 = View.TRANSLATION_X;
float[] fArr4 = new float[2];
fArr4[0] = 0.0f;
PatchProxyResult proxy4 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211684, new Class[0], Float.TYPE);
if (proxy4.isSupported) {
f13 = ((Float) proxy4.result).floatValue();
} else {
f13 = animHelper2.b ? -150.0f : 100.0f;
}
fArr4[1] = f13;
ObjectAnimator ofFloat11 = ObjectAnimator.ofFloat(productImageLoaderView2, property4, fArr4);
ofFloat11.setInterpolator(new LinearInterpolator());
ObjectAnimator ofFloat12 = ObjectAnimator.ofFloat((ProductImageLoaderView) animHelper2.a(R.id.imgLogo), View.ALPHA, 1.0f, i.f36333a);
ObjectAnimator ofFloat13 = ObjectAnimator.ofFloat((ProductImageLoaderView) animHelper2.a(R.id.imgLogo), View.TRANSLATION_Y, ((ProductImageLoaderView) animHelper2.a(R.id.imgLogo)).getTranslationY(), 0.0f);
AnimatorSet animatorSet6 = new AnimatorSet();
animatorSet6.playTogether(ofFloat11, ofFloat13, ofFloat12);
animatorSet6.setDuration(400L);
animatorSet6.start();
animHelper2.f.add(animatorSet6);
}
ObjectAnimator objectAnimator3 = animHelper2.d;
if (objectAnimator3 != null) {
objectAnimator3.pause();
}
}
}
}
}
}
/* compiled from: ChannelHotPictureView.kt */
public static final class c implements OnPageScrolledListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ChannelHotPictureView f19341a;
public c(ChannelHotPictureView channelHotPictureView) {
this.f19341a = channelHotPictureView;
}
@Override // com.youth.banner.listener.OnPageScrolledListener
public final void onPageScrolled(int i, float f, int i3) {
Object[] objArr = {new Integer(i), new Float(f), new Integer(i3)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Integer.TYPE;
if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 211772, new Class[]{cls, Float.TYPE, cls}, Void.TYPE).isSupported) {
if (f != i.f36333a) {
ChannelHotPicAnimHelper animHelper = this.f19341a.getAnimHelper();
boolean z = f > this.f19341a.f19338h;
byte b = z ? (byte) 1 : 0;
byte b2 = z ? (byte) 1 : 0;
byte b5 = z ? (byte) 1 : 0;
if (!PatchProxy.proxy(new Object[]{new Byte(b)}, animHelper, ChannelHotPicAnimHelper.changeQuickRedirect, false, 211699, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
animHelper.b = z;
}
}
this.f19341a.f19338h = f;
}
}
}
/* compiled from: ChannelHotPictureView.kt */
public static final class d implements OnPageSelectedListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ChannelHotPictureView f19342a;
public d(ChannelHotPictureView channelHotPictureView) {
this.f19342a = channelHotPictureView;
}
@Override // com.youth.banner.listener.OnPageSelectedListener
public final void onPageSelected(int i) {
if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 211773, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
ChannelHotPictureView channelHotPictureView = this.f19342a;
channelHotPictureView.i = i;
channelHotPictureView.m();
}
}
}
/* compiled from: ChannelHotPictureView.kt */
public static final class e implements IBitmapConverter {
public static ChangeQuickRedirect changeQuickRedirect;
@Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
@NotNull
public Integer destHeight() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211776, new Class[0], Integer.class);
if (proxy.isSupported) {
return (Integer) proxy.result;
}
return 420;
}
@Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
@NotNull
public Integer destWidth() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211775, new Class[0], Integer.class);
if (proxy.isSupported) {
return (Integer) proxy.result;
}
return 420;
}
@Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
public void executeConvert(@Nullable Bitmap bitmap, @Nullable Bitmap bitmap2) {
if (!PatchProxy.proxy(new Object[]{bitmap, bitmap2}, this, changeQuickRedirect, false, 211777, new Class[]{Bitmap.class, Bitmap.class}, Void.TYPE).isSupported && bitmap != null && bitmap2 != null) {
Rect rect = new Rect(0, 0, bitmap2.getWidth(), bitmap2.getHeight());
RectF rectF = new RectF(((float) bitmap.getWidth()) * 0.31f, ((float) bitmap.getHeight()) * 0.17f, ((float) bitmap.getWidth()) * 0.69f, ((float) bitmap.getHeight()) * 0.69f);
Paint paint = new Paint(1);
paint.setAntiAlias(true);
Canvas canvas = new Canvas();
canvas.setBitmap(bitmap2);
Rect rect2 = new Rect();
rectF.roundOut(rect2);
canvas.drawBitmap(bitmap, rect2, rect, paint);
}
}
@Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
@NotNull
public String obtainCacheTag() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211778, new Class[0], String.class);
return proxy.isSupported ? (String) proxy.result : "productScale";
}
@Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
@Nullable
public Bitmap obtainNewSourceBitmap(@Nullable Bitmap bitmap) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{bitmap}, this, changeQuickRedirect, false, 211774, new Class[]{Bitmap.class}, Bitmap.class);
if (proxy.isSupported) {
return (Bitmap) proxy.result;
}
if (bitmap != null) {
return bitmap;
}
return null;
}
}
@JvmOverloads
public ChannelHotPictureView(@NotNull Context context) {
this(context, null, 0, 6);
}
@JvmOverloads
public ChannelHotPictureView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0, 4);
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ ChannelHotPictureView(Context context, AttributeSet attributeSet, int i3, int i12) {
this(context, (i12 & 2) != 0 ? null : attributeSet, (i12 & 4) != 0 ? 0 : i3);
}
public View _$_findCachedViewById(int i3) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 211768, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.m == null) {
this.m = new HashMap();
}
View view = (View) this.m.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View findViewById = findViewById(i3);
this.m.put(Integer.valueOf(i3), findViewById);
return findViewById;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.modules.mall_dynamic.channel.views.BaseChannelView
public void c(ChannelHotPictureModel channelHotPictureModel) {
ChannelHotPictureModel channelHotPictureModel2 = channelHotPictureModel;
if (!PatchProxy.proxy(new Object[]{channelHotPictureModel2}, this, changeQuickRedirect, false, 211761, new Class[]{ChannelHotPictureModel.class}, Void.TYPE).isSupported) {
DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.vogueBigBannerImg);
String newHotPictureBackgroundImage = channelHotPictureModel2.getNewHotPictureBackgroundImage();
if (newHotPictureBackgroundImage == null) {
newHotPictureBackgroundImage = "";
}
duImageLoaderView.i(newHotPictureBackgroundImage).p0(DuScaleType.FIT_XY).m0(1.5120968f).x();
this.j = -2;
VogueBigImgBannerAdapter vogueBigImgBannerAdapter = this.f19337g;
List<ChannelHotPictureItemModel> list = channelHotPictureModel2.getList();
if (list == null) {
list = CollectionsKt__CollectionsKt.emptyList();
}
vogueBigImgBannerAdapter.setItems(list);
this.i = ((Banner) _$_findCachedViewById(R.id.bannerView)).getCurrentItem();
n(false);
LifecycleExtensionKt.l(e(), 400, new ChannelHotPictureView$onBind$1(this));
}
}
public final ChannelHotPicAnimHelper getAnimHelper() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211759, new Class[0], ChannelHotPicAnimHelper.class);
return (ChannelHotPicAnimHelper) (proxy.isSupported ? proxy.result : this.l.getValue());
}
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public int getLayoutId() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211760, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_mall_channel_hot_picture;
}
public final void m() {
ChannelHotPictureItemModel channelHotPictureItemModel;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211765, new Class[0], Void.TYPE).isSupported && this.f && (channelHotPictureItemModel = (ChannelHotPictureItemModel) this.f19337g.getItem(((Banner) _$_findCachedViewById(R.id.bannerView)).getCurrentItem())) != null) {
BaseChannelView.k(this, null, channelHotPictureItemModel.getTrack(), 1, null);
}
}
/* JADX DEBUG: Multi-variable search result rejected for r12v0, resolved type: boolean */
/* JADX WARN: Multi-variable type inference failed */
public final boolean n(boolean z) {
Object[] objArr = {new Byte(z ? (byte) 1 : 0)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Boolean.TYPE;
PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 211766, new Class[]{cls}, cls);
if (proxy.isSupported) {
return ((Boolean) proxy.result).booleanValue();
}
int i3 = this.i;
ChannelHotPictureItemModel channelHotPictureItemModel = (ChannelHotPictureItemModel) this.f19337g.getItem(i3);
if (channelHotPictureItemModel == null) {
return false;
}
if (this.j == i3) {
return true;
}
this.j = i3;
if (!PatchProxy.proxy(new Object[]{channelHotPictureItemModel, new Byte((byte) z)}, this, changeQuickRedirect, false, 211767, new Class[]{ChannelHotPictureItemModel.class, cls}, Void.TYPE).isSupported) {
co.c cVar = (co.c) h.b.h(1125, 807, ((ProductImageLoaderView) _$_findCachedViewById(R.id.imgLogo)).i(channelHotPictureItemModel.getCarouselImg()).d0(300));
cVar.i = new e();
cVar.x();
FontText fontText = (FontText) _$_findCachedViewById(R.id.mainTitle);
String mainTitle = channelHotPictureItemModel.getMainTitle();
if (mainTitle == null) {
mainTitle = "";
}
lr0.b.a(fontText, mainTitle, 20.0f, 24.0f);
Job job = this.k;
if (job != null) {
job.cancel((Job) ((CancellationException) null));
}
this.k = LifecycleExtensionKt.l(e(), z != 0 ? 190 : 0, new ChannelHotPictureView$realBind$1(this, channelHotPictureItemModel));
}
return true;
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.IViewAppearObserver
public void onAppeared() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211762, new Class[0], Void.TYPE).isSupported) {
((Banner) _$_findCachedViewById(R.id.bannerView)).setIsAutoLoop(true);
}
}
@Override // com.shizhuang.duapp.modules.du_mall_common.utils.IViewAppearObserver
public void onDisappeared() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211763, new Class[0], Void.TYPE).isSupported) {
((Banner) _$_findCachedViewById(R.id.bannerView)).setIsAutoLoop(false);
}
}
@Override // com.shizhuang.duapp.common.component.module.IModuleExposureObserver
public void onExposure(@Nullable DuExposureHelper.State state) {
if (!PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 211764, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) {
this.f = true;
m();
}
}
@JvmOverloads
public ChannelHotPictureView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i3) {
super(context, attributeSet, i3);
VogueBigImgBannerAdapter vogueBigImgBannerAdapter = new VogueBigImgBannerAdapter();
this.f19337g = vogueBigImgBannerAdapter;
this.i = -1;
this.j = -2;
this.l = LazyKt__LazyJVMKt.lazy(new ChannelHotPictureView$animHelper$2(this));
((Banner) _$_findCachedViewById(R.id.bannerView)).setAdapter(vogueBigImgBannerAdapter);
((Banner) _$_findCachedViewById(R.id.bannerView)).setLoopTime(3500);
((Banner) _$_findCachedViewById(R.id.bannerView)).setIndicator(new CircleIndicator(context));
vogueBigImgBannerAdapter.setOnBannerListener(new a(this, context));
((Banner) _$_findCachedViewById(R.id.bannerView)).setLifecycleOwner(e());
((Banner) _$_findCachedViewById(R.id.bannerView)).addOnPageScrollStateChangedListener(new b(this));
((Banner) _$_findCachedViewById(R.id.bannerView)).addOnPageScrolledListener(new c(this));
((Banner) _$_findCachedViewById(R.id.bannerView)).addOnPageSelectedListener(new d(this));
((Banner) _$_findCachedViewById(R.id.bannerView)).setItemRatio(0.44f);
BaseChannelView.g(this, 0, 0, 0, fi.b.b((float) 9), 7, null);
((DuImageLoaderView) _$_findCachedViewById(R.id.ivProductTopLight)).i("https://cdn.poizon.com/node-common/7ad3b280-4096-612b-c624-a111076bf79d.webp").x();
((DuImageLoaderView) _$_findCachedViewById(R.id.ivProductPoint)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/bg_mall_channel_hot_product_point.webp").x();
}
}