鑫垚影视 v20.42版本的 MD5 值为:e3822d25ef47121f1770bb4806abacfe
以下内容为反编译后的 IndexCommentAdapter.java 源代码,内容仅作参考
package com.movie.heaven.ui.index_comment;
import android.app.Activity;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.bytedance.msdk.api.v2.GMDislikeCallback;
import com.bytedance.msdk.api.v2.ad.nativeAd.GMNativeAd;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.movie.heaven.been.AD.MyTTFeedAd;
import com.movie.heaven.been.index_comment.IndexCommentBeen;
import com.yinghua.mediavideo.app.R;
import e.b.a.q.p.j;
import e.b.a.q.r.f.c;
import e.b.a.u.i;
import e.d.a.c.a.s.b;
import e.d.a.c.a.v.e;
import e.l.a.j.m;
import e.l.a.j.x;
import java.util.List;
public class IndexCommentAdapter extends BaseMultiItemQuickAdapter<b, BaseViewHolder> implements e {
public class a implements GMDislikeCallback {
public final b f5037a;
public final BaseViewHolder f5038b;
public final GMNativeAd f5039c;
public a(b bVar, BaseViewHolder baseViewHolder, GMNativeAd gMNativeAd) {
this.f5037a = bVar;
this.f5038b = baseViewHolder;
this.f5039c = gMNativeAd;
}
@Override
public void onCancel() {
}
@Override
public void onRefuse() {
}
@Override
public void onSelected(int i2, String str) {
IndexCommentAdapter.this.getData().remove(this.f5037a);
IndexCommentAdapter.this.notifyItemChanged(this.f5038b.getLayoutPosition());
this.f5039c.destroy();
}
@Override
public void onShow() {
IndexCommentAdapter.this.getData().remove(this.f5037a);
IndexCommentAdapter.this.notifyItemChanged(this.f5038b.getLayoutPosition());
this.f5039c.destroy();
}
}
public IndexCommentAdapter(List<b> list) {
super(list);
a(4, R.layout.index_comment_adapter_item);
a(5, R.layout.item_empty_ad);
}
private void d(String str, ImageView imageView) {
e.b.a.b.D(getContext()).p(m.a(str, "https://api-shoulei-ssl.xunlei.com/")).y2(c.o().j()).g(new i().y1(true).u(j.f11469b).o1(R.color.app_place_holder)).c2(imageView);
}
@Override
public void convert(@NonNull BaseViewHolder baseViewHolder, b bVar) {
int itemType = bVar.getItemType();
if (itemType != 4) {
if (itemType != 5) {
return;
}
} else if (bVar instanceof IndexCommentBeen.DataBean.ArrayBean) {
IndexCommentBeen.DataBean.ArrayBean arrayBean = (IndexCommentBeen.DataBean.ArrayBean) bVar;
IndexCommentBeen.DataBean.ArrayBean.CinecismBean cinecism = arrayBean.getCinecism();
IndexCommentBeen.DataBean.ArrayBean.MediaInfoBean media_info = arrayBean.getMedia_info();
TextView textView = (TextView) baseViewHolder.getView(R.id.tvUser);
if (media_info != null) {
String name = media_info.getName();
if (x.f(name) && cinecism != null) {
name = "Tag:" + cinecism.getTag();
}
textView.setText(name);
textView.setVisibility(0);
} else {
textView.setVisibility(8);
}
if (cinecism != null) {
TextView textView2 = (TextView) baseViewHolder.getView(R.id.tvTitle);
String title = cinecism.getTitle();
if (!x.f(title)) {
textView2.setText(title);
textView2.setVisibility(0);
} else {
textView2.setVisibility(8);
}
TextView textView3 = (TextView) baseViewHolder.getView(R.id.tvTitle2);
String summary = cinecism.getSummary();
if (!x.f(summary)) {
textView3.setText(summary);
textView3.setVisibility(0);
} else {
textView3.setVisibility(8);
}
LinearLayout linearLayout = (LinearLayout) baseViewHolder.getView(R.id.ll_image);
ImageView imageView = (ImageView) baseViewHolder.getView(R.id.iv_1);
ImageView imageView2 = (ImageView) baseViewHolder.getView(R.id.iv_2);
ImageView imageView3 = (ImageView) baseViewHolder.getView(R.id.iv_3);
ImageView imageView4 = (ImageView) baseViewHolder.getView(R.id.iv_4);
if (cinecism.getImage_list() != null) {
if (cinecism.getImage_list().size() != 0 && cinecism.getImage_list().size() != 1) {
if (cinecism.getImage_list().size() == 2) {
linearLayout.setVisibility(0);
imageView.setVisibility(0);
imageView2.setVisibility(0);
imageView3.setVisibility(8);
imageView4.setVisibility(8);
d(cinecism.getImage_list().get(0), imageView);
d(cinecism.getImage_list().get(1), imageView2);
return;
}
linearLayout.setVisibility(0);
imageView.setVisibility(0);
imageView2.setVisibility(0);
imageView3.setVisibility(0);
imageView4.setVisibility(8);
d(cinecism.getImage_list().get(0), imageView);
d(cinecism.getImage_list().get(1), imageView2);
d(cinecism.getImage_list().get(2), imageView3);
return;
}
linearLayout.setVisibility(8);
imageView.setVisibility(8);
imageView2.setVisibility(8);
imageView3.setVisibility(8);
imageView4.setVisibility(0);
d(cinecism.getCover_url(), imageView4);
return;
}
linearLayout.setVisibility(8);
imageView.setVisibility(8);
imageView2.setVisibility(8);
imageView3.setVisibility(8);
imageView4.setVisibility(8);
return;
}
return;
}
try {
if (bVar instanceof MyTTFeedAd) {
GMNativeAd feedAd = ((MyTTFeedAd) bVar).getFeedAd();
if (feedAd.hasDislike()) {
feedAd.setDislikeCallback((Activity) getContext(), new a(bVar, baseViewHolder, feedAd));
}
FrameLayout frameLayout = (FrameLayout) baseViewHolder.getView(R.id.frame);
frameLayout.removeAllViews();
frameLayout.addView(feedAd.getExpressView());
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}