得物.apk(点击下载) / SellerMarginHeaderView.java
package com.shizhuang.duapp.modules.mall_seller.merchant.margin.views;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import cd.h;
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.widget.font.FontText;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuRequestOptions;
import com.shizhuang.duapp.modules.du_mall_common.extension.ViewExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.widget.DuIconsTextView;
import com.shizhuang.duapp.modules.mall_seller.merchant.margin.model.SellerMarginSVIPModel;
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;
import qu0.a;
@Metadata(bv = {}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B'\b\u0007\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u0005\u0012\b\b\u0002\u0010\b\u001a\u00020\u0007¢\u0006\u0004\b\t\u0010\n¨\u0006\u000b"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_seller/merchant/margin/views/SellerMarginHeaderView;", "Lcom/shizhuang/duapp/common/component/module/AbsModuleView;", "Lqu0/a;", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "du_mall_seller_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: SellerMarginHeaderView.kt */
public final class SellerMarginHeaderView extends AbsModuleView<a> {
public static ChangeQuickRedirect changeQuickRedirect;
public HashMap b;
@JvmOverloads
public SellerMarginHeaderView(@NotNull Context context) {
this(context, null, 0, 6);
}
@JvmOverloads
public SellerMarginHeaderView(@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 */ SellerMarginHeaderView(Context context, AttributeSet attributeSet, int i, int i3) {
this(context, (i3 & 2) != 0 ? null : attributeSet, (i3 & 4) != 0 ? 0 : i);
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 228056, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.b == null) {
this.b = new HashMap();
}
View view = (View) this.b.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
this.b.put(Integer.valueOf(i), findViewById);
return findViewById;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // com.shizhuang.duapp.common.component.module.IModuleView, com.shizhuang.duapp.common.component.module.AbsModuleView
public void update(a aVar) {
String str;
String str2;
String str3;
String str4;
String str5;
String str6;
SellerMarginSVIPModel sellerMarginSVIPModel;
a aVar2 = aVar;
if (!PatchProxy.proxy(new Object[]{aVar2}, this, changeQuickRedirect, false, 228055, new Class[]{a.class}, Void.TYPE).isSupported) {
super.update(aVar2);
FontText fontText = (FontText) _$_findCachedViewById(R.id.tvAmount);
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228037, new Class[0], String.class);
if (proxy.isSupported) {
str = (String) proxy.result;
} else {
str = aVar2.f37532a;
}
String str7 = "0.00";
if (str == null) {
str = str7;
}
fontText.c(str, 26, 36);
TextView textView = (TextView) _$_findCachedViewById(R.id.tvAmountTitle);
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228038, new Class[0], String.class);
if (proxy2.isSupported) {
str2 = (String) proxy2.result;
} else {
str2 = aVar2.b;
}
textView.setText(str2);
FontText fontText2 = (FontText) _$_findCachedViewById(R.id.tvFrozenAmount);
PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228039, new Class[0], String.class);
if (proxy3.isSupported) {
str3 = (String) proxy3.result;
} else {
str3 = aVar2.f37533c;
}
if (str3 == null) {
str3 = str7;
}
fontText2.c(str3, 14, 14);
TextView textView2 = (TextView) _$_findCachedViewById(R.id.tvFrozenAmountTitle);
PatchProxyResult proxy4 = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228040, new Class[0], String.class);
if (proxy4.isSupported) {
str4 = (String) proxy4.result;
} else {
str4 = aVar2.d;
}
textView2.setText(str4);
FontText fontText3 = (FontText) _$_findCachedViewById(R.id.tvCanUseAmount);
PatchProxyResult proxy5 = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228041, new Class[0], String.class);
if (proxy5.isSupported) {
str5 = (String) proxy5.result;
} else {
str5 = aVar2.e;
}
if (str5 != null) {
str7 = str5;
}
fontText3.c(str7, 14, 14);
TextView textView3 = (TextView) _$_findCachedViewById(R.id.tvCanUseAmountTitle);
PatchProxyResult proxy6 = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228042, new Class[0], String.class);
if (proxy6.isSupported) {
str6 = (String) proxy6.result;
} else {
str6 = aVar2.f;
}
textView3.setText(str6);
PatchProxyResult proxy7 = PatchProxy.proxy(new Object[0], aVar2, a.changeQuickRedirect, false, 228043, new Class[0], SellerMarginSVIPModel.class);
if (proxy7.isSupported) {
sellerMarginSVIPModel = (SellerMarginSVIPModel) proxy7.result;
} else {
sellerMarginSVIPModel = aVar2.f37534g;
}
String sVipStatus = SellerMarginSVIPModel.Companion.getSVipStatus(sellerMarginSVIPModel);
int hashCode = sVipStatus.hashCode();
String str8 = null;
if (hashCode != -1926712183) {
if (hashCode == -1124608772 && sVipStatus.equals("NotOpened")) {
ViewExtensionKt.o((LinearLayout) _$_findCachedViewById(R.id.llSVIPUpgrade));
ViewExtensionKt.k((DuIconsTextView) _$_findCachedViewById(R.id.itvDisable));
((TextView) _$_findCachedViewById(R.id.tvSVIPUpgradeTitle)).setText(sellerMarginSVIPModel != null ? sellerMarginSVIPModel.getTitle() : null);
((TextView) _$_findCachedViewById(R.id.tvSVIPUpgradeInfo)).setText(sellerMarginSVIPModel != null ? sellerMarginSVIPModel.getInfo() : null);
TextView textView4 = (TextView) _$_findCachedViewById(R.id.tvSVIPUpgradeDetail);
if (sellerMarginSVIPModel != null) {
str8 = sellerMarginSVIPModel.getRedirectText();
}
textView4.setText(str8);
com.shizhuang.duapp.common.extension.ViewExtensionKt.j((TextView) _$_findCachedViewById(R.id.tvSVIPUpgradeDetail), 0, new SellerMarginHeaderView$update$2(this, sellerMarginSVIPModel), 1);
return;
}
} else if (sVipStatus.equals("Opened")) {
ViewExtensionKt.k((LinearLayout) _$_findCachedViewById(R.id.llSVIPUpgrade));
ViewExtensionKt.o((DuIconsTextView) _$_findCachedViewById(R.id.itvDisable));
DuIconsTextView duIconsTextView = (DuIconsTextView) _$_findCachedViewById(R.id.itvDisable);
if (sellerMarginSVIPModel != null) {
str8 = sellerMarginSVIPModel.getFrozenAmountRemind();
}
duIconsTextView.setText(str8);
com.shizhuang.duapp.common.extension.ViewExtensionKt.j((DuIconsTextView) _$_findCachedViewById(R.id.itvDisable), 0, new SellerMarginHeaderView$update$1(this, sellerMarginSVIPModel), 1);
return;
}
ViewExtensionKt.k((LinearLayout) _$_findCachedViewById(R.id.llSVIPUpgrade));
ViewExtensionKt.k((DuIconsTextView) _$_findCachedViewById(R.id.itvDisable));
}
}
@JvmOverloads
public SellerMarginHeaderView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
com.shizhuang.duapp.common.extension.ViewExtensionKt.v(this, R.layout.layout_seller_margin_header, true);
((DuRequestOptions) mn.a.f35714a.g("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/merchant/img_card1@3x.png").u(new Function1<Bitmap, Unit>(this) {
/* class com.shizhuang.duapp.modules.mall_seller.merchant.margin.views.SellerMarginHeaderView.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ SellerMarginHeaderView this$0;
{
this.this$0 = r1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Bitmap bitmap) {
invoke(bitmap);
return Unit.INSTANCE;
}
public final void invoke(@NotNull Bitmap bitmap) {
if (!PatchProxy.proxy(new Object[]{bitmap}, this, changeQuickRedirect, false, 228058, new Class[]{Bitmap.class}, Void.TYPE).isSupported) {
((LinearLayout) this.this$0._$_findCachedViewById(R.id.llSVIPUpgrade)).setBackground(new BitmapDrawable(this.this$0.getResources(), bitmap));
}
}
})).G(h.f(this)).y();
}
}