QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 NovelItemLayout.java 源代码,内容仅作参考
package com.tencent.mtt.browser.download.business.ui.card.ad.novel;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import androidx.core.view.GravityCompat;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.browser.download.business.report.DownloadStatUtils;
import com.tencent.mtt.browser.download.business.ui.card.ad.novel.HotNovelData;
import com.tencent.mtt.browser.download.engine.utils.DLogger;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import qb.a.e;
public class NovelItemLayout extends LinearLayout implements View.OnClickListener {
private QBWebImageView f37202a;
private QBTextView f37203b;
private HotNovelData.NovelData f37204c;
public NovelItemLayout(Context context) {
super(context);
setId(R.id.download_page_novel_layout);
setOrientation(1);
setOnClickListener(this);
a();
}
private void a() {
this.f37202a = new QBWebImageView(getContext());
this.f37202a.setLayoutParams(new LinearLayout.LayoutParams(MttResources.s(60), MttResources.s(80)));
this.f37202a.setRadius(MttResources.s(8));
addView(this.f37202a);
this.f37203b = new QBTextView(getContext());
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(MttResources.s(60), -2);
layoutParams.topMargin = MttResources.s(6);
this.f37203b.setTextColorNormalIds(e.f85871a);
this.f37203b.setMaxLines(2);
this.f37203b.setGravity(GravityCompat.START);
this.f37203b.setEllipsize(TextUtils.TruncateAt.END);
this.f37203b.setTextSize(MttResources.s(12));
addView(this.f37203b, layoutParams);
}
private boolean b() {
return TextUtils.isEmpty(this.f37204c.b()) && TextUtils.isEmpty(this.f37204c.a());
}
public boolean a(HotNovelData.NovelData novelData) {
if (novelData == null) {
DLogger.a("DownloadPage.RecommendAd", "NovelItemLayout bindData null");
return false;
}
this.f37204c = novelData;
this.f37202a.setUrl(novelData.b());
this.f37203b.setText(novelData.a());
return !b();
}
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
if (this.f37204c != null) {
String str = UrlUtils.encode(UrlUtils.addParamsToUrl("https://m.sogou.com/web/searchList.jsp?pid=sogou-waps-e1ffc9eb1d4c1712", "keyword=" + this.f37204c.a())) + "&q=" + UrlUtils.encode(this.f37204c.a());
DLogger.a("DownloadPage.RecommendAd", "NovelItemLayout click url: " + str);
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("qb://searchresult?pagetype=sogou_result&sogouUrl=" + str + "&jump_from=1_19_32_01&entryScene=download_hot_novel"));
DownloadStatUtils.a("DLM_novel01");
}
EventCollector.getInstance().onViewClicked(view);
}
}