4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 ChatEnterConditionDialog.java 源代码,内容仅作参考
package com.m4399.gamecenter.plugin.main.views;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.m4399.gamecenter.plugin.main.R;
import com.m4399.gamecenter.plugin.main.models.groupchat.ChatConditionModel;
import com.m4399.support.quick.RecyclerQuickAdapter;
import com.m4399.support.quick.RecyclerQuickViewHolder;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u00012\u00020\u0002:\u0002\u0017\u0018B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\n\u001a\u00020\u000bH\u0002J\b\u0010\f\u001a\u00020\u000bH\u0002J\b\u0010\r\u001a\u00020\u000bH\u0002J\u0012\u0010\u000e\u001a\u00020\u000b2\b\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0016J&\u0010\u0011\u001a\u00020\u000b2\u0016\u0010\u0012\u001a\u0012\u0012\u0004\u0012\u00020\u00140\u0013j\b\u0012\u0004\u0012\u00020\u0014`\u00152\u0006\u0010\u0016\u001a\u00020\tR\u0012\u0010\u0006\u001a\u00060\u0007R\u00020\u0000X\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0019"}, d2 = {"Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog;", "Lcom/dialog/CommonBaseDialog;", "Landroid/view/View$OnClickListener;", com.umeng.analytics.pro.d.R, "Landroid/content/Context;", "(Landroid/content/Context;)V", "adapter", "Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog$Adapter;", "webUrl", "", "aboutClick", "", "initView", "knowClick", "onClick", "v", "Landroid/view/View;", "show", "list", "Ljava/util/ArrayList;", "Lcom/m4399/gamecenter/plugin/main/models/groupchat/ChatConditionModel;", "Lkotlin/collections/ArrayList;", "url", "Adapter", "ViewHolder", "plugin_main_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class ChatEnterConditionDialog extends com.dialog.b implements View.OnClickListener {
private a eEa;
private String webUrl;
public ChatEnterConditionDialog(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
this.webUrl = "";
initView();
}
private final void initView() {
a aVar = null;
View inflate = LayoutInflater.from(getContext()).inflate(R.layout.m4399_view_dialog_chat_enter_condition, (ViewGroup) null);
Intrinsics.checkNotNullExpressionValue(inflate, "inflater.inflate(R.layou…at_enter_condition, null)");
View findViewById = inflate.findViewById(R.id.recycle_view);
Intrinsics.checkNotNullExpressionValue(findViewById, "contentView.findViewById(R.id.recycle_view)");
RecyclerView recyclerView = (RecyclerView) findViewById;
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
this.eEa = new a(this, recyclerView);
a aVar2 = this.eEa;
if (aVar2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("adapter");
} else {
aVar = aVar2;
}
recyclerView.setAdapter(aVar);
ChatEnterConditionDialog chatEnterConditionDialog = this;
inflate.findViewById(R.id.tv_about_chat).setOnClickListener(chatEnterConditionDialog);
inflate.findViewById(R.id.tv_i_know).setOnClickListener(chatEnterConditionDialog);
setContentView(inflate);
}
public final void show(ArrayList<ChatConditionModel> list, String url) {
Intrinsics.checkNotNullParameter(list, "list");
Intrinsics.checkNotNullParameter(url, "url");
this.webUrl = url;
a aVar = this.eEa;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("adapter");
aVar = null;
}
aVar.replaceAll(list);
super.show();
}
@Override
public void onClick(View v) {
if (v == null) {
return;
}
if (v.getId() == R.id.tv_about_chat) {
Yu();
} else if (v.getId() == R.id.tv_i_know) {
Yv();
}
}
private final void Yu() {
if (TextUtils.isEmpty(this.webUrl)) {
this.webUrl = "https://www.4399.cn/help/groupChat.html";
}
com.m4399.gamecenter.plugin.main.manager.ae.a.getInstance().showWebPanelDialog(getContext(), "群聊说明", this.webUrl);
}
private final void Yv() {
dismiss();
}
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\b\u0086\u0004\u0018\u00002\u0012\u0012\u0004\u0012\u00020\u0002\u0012\b\u0012\u00060\u0003R\u00020\u00040\u0001B\r\u0012\u0006\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\u001c\u0010\b\u001a\u00060\u0003R\u00020\u00042\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\fH\u0014J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\fH\u0014J\u0010\u0010\u000e\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\fH\u0014J,\u0010\u0010\u001a\u00020\u00112\n\u0010\u0012\u001a\u00060\u0003R\u00020\u00042\u0006\u0010\u000f\u001a\u00020\f2\u0006\u0010\u0013\u001a\u00020\f2\u0006\u0010\u0014\u001a\u00020\u0015H\u0014¨\u0006\u0016"}, d2 = {"Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog$Adapter;", "Lcom/m4399/support/quick/RecyclerQuickAdapter;", "Lcom/m4399/gamecenter/plugin/main/models/groupchat/ChatConditionModel;", "Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog$ViewHolder;", "Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog;", "recyclerView", "Landroid/support/v7/widget/RecyclerView;", "(Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog;Landroid/support/v7/widget/RecyclerView;)V", "createItemViewHolder", "itemView", "Landroid/view/View;", "viewType", "", "getItemLayoutID", "getViewType", "position", "onBindItemViewHolder", "", "holder", "index", "isScrolling", "", "plugin_main_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class a extends RecyclerQuickAdapter<ChatConditionModel, b> {
final ChatEnterConditionDialog eEb;
@Override
protected int getViewType(int position) {
return 0;
}
public a(ChatEnterConditionDialog this$0, RecyclerView recyclerView) {
super(recyclerView);
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(recyclerView, "recyclerView");
this.eEb = this$0;
}
@Override
public b createItemViewHolder(View itemView, int i) {
Intrinsics.checkNotNullParameter(itemView, "itemView");
ChatEnterConditionDialog chatEnterConditionDialog = this.eEb;
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
return new b(chatEnterConditionDialog, context, itemView);
}
@Override
public void onBindItemViewHolder(b holder, int i, int i2, boolean z) {
Intrinsics.checkNotNullParameter(holder, "holder");
ChatConditionModel chatConditionModel = getData().get(i2);
Intrinsics.checkNotNullExpressionValue(chatConditionModel, "data[index]");
holder.bindData(chatConditionModel);
}
@Override
protected int getItemLayoutID(int viewType) {
return R.layout.m4399_cell_chat_enter_condition;
}
}
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0004\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\u000e\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u000eJ\b\u0010\u000f\u001a\u00020\fH\u0014R\u000e\u0010\u0007\u001a\u00020\bX\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082.¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog$ViewHolder;", "Lcom/m4399/support/quick/RecyclerQuickViewHolder;", com.umeng.analytics.pro.d.R, "Landroid/content/Context;", "itemView", "Landroid/view/View;", "(Lcom/m4399/gamecenter/plugin/main/views/ChatEnterConditionDialog;Landroid/content/Context;Landroid/view/View;)V", "condition", "Landroid/widget/TextView;", "reach", "Landroid/widget/ImageView;", "bindData", "", "model", "Lcom/m4399/gamecenter/plugin/main/models/groupchat/ChatConditionModel;", "initView", "plugin_main_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class b extends RecyclerQuickViewHolder {
private TextView dWZ;
final ChatEnterConditionDialog eEb;
private ImageView eEc;
public b(ChatEnterConditionDialog this$0, Context context, View itemView) {
super(context, itemView);
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(itemView, "itemView");
this.eEb = this$0;
}
@Override
protected void initView() {
View findViewById = findViewById(R.id.tv_condition);
Intrinsics.checkNotNullExpressionValue(findViewById, "findViewById(R.id.tv_condition)");
this.dWZ = (TextView) findViewById;
View findViewById2 = findViewById(R.id.iv_reach_condition);
Intrinsics.checkNotNullExpressionValue(findViewById2, "findViewById(R.id.iv_reach_condition)");
this.eEc = (ImageView) findViewById2;
}
public final void bindData(ChatConditionModel model) {
Intrinsics.checkNotNullParameter(model, "model");
TextView textView = this.dWZ;
if (textView == null) {
Intrinsics.throwUninitializedPropertyAccessException("condition");
textView = null;
}
textView.setText(model.getCondition());
ImageView imageView = this.eEc;
if (imageView == null) {
Intrinsics.throwUninitializedPropertyAccessException("reach");
imageView = null;
}
imageView.setVisibility(model.getIsReach() ? 0 : 4);
}
}
}