得物.apk(点击下载) / OrderPublishDialog.java
package com.shizhuang.duapp.modules.common.dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatDialog;
import co.c;
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.widget.font.IconFontTextView;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.common.model.OrderPublishingModel;
import com.shizhuang.duapp.modules.common.model.OrderPublishingTips;
import df.q0;
import fi.b;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\u00020\u0001:\u0001\u0002¨\u0006\u0003"}, d2 = {"Lcom/shizhuang/duapp/modules/common/dialog/OrderPublishDialog;", "Landroidx/appcompat/app/AppCompatDialog;", "a", "du_order_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: OrderPublishDialog.kt */
public final class OrderPublishDialog extends AppCompatDialog {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public static final a e = new a(null);
@Nullable
public OrderPublishingModel b;
@Nullable
/* renamed from: c reason: collision with root package name */
public View.OnClickListener f11467c;
public boolean d;
/* compiled from: OrderPublishDialog.kt */
public static final class a {
public static ChangeQuickRedirect changeQuickRedirect;
public a(DefaultConstructorMarker defaultConstructorMarker) {
}
@JvmStatic
@NotNull
public final OrderPublishDialog a(@NotNull Context context, @Nullable OrderPublishingModel orderPublishingModel, @Nullable View.OnClickListener onClickListener) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context, orderPublishingModel, onClickListener}, this, changeQuickRedirect, false, 75338, new Class[]{Context.class, OrderPublishingModel.class, View.OnClickListener.class}, OrderPublishDialog.class);
if (proxy.isSupported) {
return (OrderPublishDialog) proxy.result;
}
OrderPublishDialog orderPublishDialog = new OrderPublishDialog(context, 0, 2);
if (!PatchProxy.proxy(new Object[]{orderPublishingModel}, orderPublishDialog, OrderPublishDialog.changeQuickRedirect, false, 75329, new Class[]{OrderPublishingModel.class}, Void.TYPE).isSupported) {
orderPublishDialog.b = orderPublishingModel;
}
if (!PatchProxy.proxy(new Object[]{onClickListener}, orderPublishDialog, OrderPublishDialog.changeQuickRedirect, false, 75331, new Class[]{View.OnClickListener.class}, Void.TYPE).isSupported) {
orderPublishDialog.f11467c = onClickListener;
}
return orderPublishDialog;
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public OrderPublishDialog(Context context, int i, int i3) {
super(context, (i3 & 2) != 0 ? R.style.CustomDialog : i);
}
public final boolean a() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 75332, new Class[0], Boolean.TYPE);
return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : this.d;
}
@Override // androidx.appcompat.app.AppCompatDialog
public void onCreate(@Nullable Bundle bundle) {
String str;
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 75334, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
setContentView(R.layout.dialog_order_publish);
Window window = getWindow();
if (window != null) {
window.setWindowAnimations(R.style.OrderPublishDialogAnimation);
window.setBackgroundDrawable(new ColorDrawable(0));
window.setGravity(17);
window.getDecorView().setPadding(0, 0, 0, 0);
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.width = b.b((float) 275);
attributes.height = b.b((float) 413);
window.setAttributes(attributes);
}
((IconFontTextView) findViewById(R.id.iv_close_dialog)).setOnClickListener(new OrderPublishDialog$onCreate$2(this));
c i = ((DuImageLoaderView) findViewById(R.id.iv_publish)).i("https://cdn.poizon.com/node-common/dfa2dc1f-0b9b-3517-fcd7-90b4fbe77d67-480-162.png");
DuScaleType duScaleType = DuScaleType.CENTER_CROP;
i.p0(duScaleType).x();
((DuImageLoaderView) findViewById(R.id.v_card1)).i("https://cdn.poizon.com/node-common/ddf474cf-1adf-7195-d501-fa61d6094d2c.webp").p0(duScaleType).x();
((DuImageLoaderView) findViewById(R.id.v_card2)).i("https://cdn.poizon.com/node-common/1e7e4f4a-d5c5-3cc1-efc5-7e56531b646d.webp").p0(duScaleType).x();
((DuImageLoaderView) findViewById(R.id.v_card3)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/ic_publish_card3.webp").p0(duScaleType).x();
((DuImageLoaderView) findViewById(R.id.v_card4)).i("https://cdn.poizon.com/node-common/27e13018-39ff-05e5-4bd3-b43925989fb1.webp").p0(duScaleType).x();
((DuImageLoaderView) findViewById(R.id.tipImg)).i("https://apk.poizon.com/duApp/Android_Config/resource/mall/app/order/ic_publish_tipimg.png").p0(duScaleType).x();
((DuImageLoaderView) findViewById(R.id.iv_publish)).setOnClickListener(new OrderPublishDialog$onCreate$3(this));
((LinearLayout) findViewById(R.id.ll_check)).setOnClickListener(new OrderPublishDialog$onCreate$4(this));
OrderPublishingModel orderPublishingModel = this.b;
if (orderPublishingModel != null) {
DuImageLoaderView duImageLoaderView = (DuImageLoaderView) findViewById(R.id.iv_main_title);
String mainTitleUrl = orderPublishingModel.getMainTitleUrl();
if (mainTitleUrl == null) {
mainTitleUrl = "";
}
duImageLoaderView.g(mainTitleUrl);
((TextView) findViewById(R.id.tv_assist)).setText(orderPublishingModel.getAssistTitle());
DuImageLoaderView duImageLoaderView2 = (DuImageLoaderView) findViewById(R.id.tipImg);
String imageUrl = orderPublishingModel.getImageUrl();
if (imageUrl == null) {
imageUrl = "";
}
duImageLoaderView2.g(imageUrl);
DuImageLoaderView duImageLoaderView3 = (DuImageLoaderView) findViewById(R.id.iv_publish);
String buttonUrl = orderPublishingModel.getButtonUrl();
if (buttonUrl == null) {
buttonUrl = "";
}
duImageLoaderView3.g(buttonUrl);
DuImageLoaderView duImageLoaderView4 = (DuImageLoaderView) findViewById(R.id.iv_content);
String contentUrl = orderPublishingModel.getContentUrl();
if (contentUrl == null) {
contentUrl = "";
}
duImageLoaderView4.g(contentUrl);
TextView textView = (TextView) findViewById(R.id.tv_tip_title);
OrderPublishingTips orderPublishingTips = orderPublishingModel.getOrderPublishingTips();
String title = orderPublishingTips != null ? orderPublishingTips.getTitle() : null;
if (title == null) {
title = "";
}
textView.setText(title);
OrderPublishingTips orderPublishingTips2 = orderPublishingModel.getOrderPublishingTips();
if (orderPublishingTips2 != null) {
q0 q0Var = new q0((TextView) findViewById(R.id.tv_tip_content), true);
List<String> contentList = orderPublishingTips2.getContentList();
if (contentList != null) {
int i3 = 0;
for (T t : contentList) {
int i12 = i3 + 1;
if (i3 < 0) {
CollectionsKt__CollectionsKt.throwIndexOverflow();
}
q0Var.a(t, new Object[0]);
List<String> contentList2 = orderPublishingTips2.getContentList();
if (i3 != (contentList2 != null ? Integer.valueOf(contentList2.size()) : null).intValue() - 1) {
str = "\n";
} else {
str = "";
}
q0Var.a(str, new Object[0]);
i3 = i12;
}
}
q0Var.b();
}
}
}
}
}