得物.apk(点击下载) / OneKeyResellItemView.java
package com.shizhuang.duapp.modules.common.dialog;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
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.component.module.AbsModuleView;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.common.model.ButtonModel;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function1;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\b\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\b\u0010\u0004\u001a\u00020\u0003H\u0016R0\u0010\r\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u00058\u0006@\u0006X\u000e¢\u0006\u0012\n\u0004\b\u0007\u0010\b\u001a\u0004\b\t\u0010\n\"\u0004\b\u000b\u0010\f¨\u0006\u000e"}, d2 = {"Lcom/shizhuang/duapp/modules/common/dialog/OneKeyResellItemView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lcom/shizhuang/duapp/modules/common/model/ButtonModel;", "", "getLayoutId", "Lkotlin/Function1;", "", "b", "Lkotlin/jvm/functions/Function1;", "getClickBlock", "()Lkotlin/jvm/functions/Function1;", "setClickBlock", "(Lkotlin/jvm/functions/Function1;)V", "clickBlock", "du_order_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: OneKeyResellDialog.kt */
public final class OneKeyResellItemView extends AbsModuleView<ButtonModel> {
public static ChangeQuickRedirect changeQuickRedirect;
@Nullable
public Function1<? super ButtonModel, Unit> b;
/* renamed from: c reason: collision with root package name */
public HashMap f11460c;
@JvmOverloads
public OneKeyResellItemView(@NotNull Context context) {
this(context, null, 0, null, 14);
}
@JvmOverloads
public OneKeyResellItemView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
this(context, attributeSet, 0, null, 12);
}
@JvmOverloads
public OneKeyResellItemView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
this(context, attributeSet, i, null, 8);
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public OneKeyResellItemView(Context context, AttributeSet attributeSet, int i, Function1 function1, int i3) {
super(context, (i3 & 2) != 0 ? null : attributeSet, (i3 & 4) != 0 ? 0 : i);
this.b = null;
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 75232, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.f11460c == null) {
this.f11460c = new HashMap();
}
View view = (View) this.f11460c.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
this.f11460c.put(Integer.valueOf(i), findViewById);
return findViewById;
}
/* JADX DEBUG: Type inference failed for r0v2. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.shizhuang.duapp.modules.common.model.ButtonModel, kotlin.Unit>, kotlin.jvm.functions.Function1<com.shizhuang.duapp.modules.common.model.ButtonModel, kotlin.Unit> */
@Nullable
public final Function1<ButtonModel, Unit> getClickBlock() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 75230, new Class[0], Function1.class);
return proxy.isSupported ? (Function1) proxy.result : this.b;
}
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public int getLayoutId() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 75228, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_order_one_key_resell_item_view;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.common.component.module.AbsModuleView
public void onChanged(ButtonModel buttonModel) {
ButtonModel buttonModel2 = buttonModel;
int i = 0;
if (!PatchProxy.proxy(new Object[]{buttonModel2}, this, changeQuickRedirect, false, 75229, new Class[]{ButtonModel.class}, Void.TYPE).isSupported) {
super.onChanged(buttonModel2);
((DuImageLoaderView) _$_findCachedViewById(R.id.ivItemIcon)).i(buttonModel2.getIconUrl()).x();
((TextView) _$_findCachedViewById(R.id.tvItemTitle)).setText(buttonModel2.getButtonDesc());
((TextView) _$_findCachedViewById(R.id.tvItemSubTitle)).setText(buttonModel2.getSubtitle());
((DuImageLoaderView) _$_findCachedViewById(R.id.ivItemFlag)).i(buttonModel2.getIconUrl());
int buttonType = buttonModel2.getButtonType();
String str = buttonType != 31 ? buttonType != 126 ? null : "https://cdn.poizon.com/node-common/5f3d1822-5f48-3b9e-de20-c396e1b3f939-213-75.png" : "https://cdn.poizon.com/node-common/1ef81b09-e020-2f23-471e-7236e888b9c4-180-75.png";
DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.ivItemFlag);
if (!(!(str == null || str.length() == 0))) {
i = 8;
}
duImageLoaderView.setVisibility(i);
if (str != null) {
((DuImageLoaderView) _$_findCachedViewById(R.id.ivItemFlag)).i(str).y().x();
}
ViewExtensionKt.j(this, 0, new OneKeyResellItemView$onChanged$2(this, buttonModel2), 1);
}
}
public final void setClickBlock(@Nullable Function1<? super ButtonModel, Unit> function1) {
if (!PatchProxy.proxy(new Object[]{function1}, this, changeQuickRedirect, false, 75231, new Class[]{Function1.class}, Void.TYPE).isSupported) {
this.b = function1;
}
}
}