QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 NovelListSharePage.java 源代码,内容仅作参考
package com.tencent.mtt.external.novel.ui;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.FrameLayout;
import com.huawei.hms.framework.common.ContainerUtils;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.QBUIAppEngine;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.webview.QBWebView;
import com.tencent.mtt.browser.window.templayer.BaseNativeGroup;
import com.tencent.mtt.external.novel.base.MTT.NovelSysConfig;
import com.tencent.mtt.external.novel.base.ui.NativeCommonTitleBar;
import com.tencent.mtt.external.novel.base.ui.NovelProgressTitleBar;
import com.tencent.mtt.external.novel.base.ui.NovelWebViewFrame;
import com.tencent.mtt.external.novel.base.ui.NovelWebviewPage;
import com.tencent.mtt.view.layout.QBLinearLayout;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import com.xiaomi.mipush.sdk.Constants;
import java.util.ArrayList;
public class NovelListSharePage extends NovelWebviewPage {
public NovelListSharePage(Context context, BaseNativeGroup baseNativeGroup, Bundle bundle) {
super(context, new FrameLayout.LayoutParams(-1, -1), baseNativeGroup, bundle);
this.f54969c = new QBLinearLayout(getContext());
this.f54969c.setOrientation(1);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
layoutParams.topMargin = getNovelContext().e.f();
addView(this.f54969c, layoutParams);
NativeCommonTitleBar.TitleBarData titleBarData = new NativeCommonTitleBar.TitleBarData();
titleBarData.f54786d = R.drawable.adf;
titleBarData.g = 1;
titleBarData.i = 2;
titleBarData.f54784b = MttResources.l(R.string.aog);
this.f = new NovelProgressTitleBar(this, titleBarData, 1, getNovelContext());
this.f54969c.addView(this.f);
this.f54970d = new NovelWebViewFrame(QBUIAppEngine.getInstance().getApplicationContext(), c(), this, getNovelContext());
this.f54970d.setWebViewEventObserver(this);
this.f54970d.setCanScroll(true);
this.f54970d.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
this.f54969c.addView(this.f54970d);
this.f.setProcessBarCalculator(this.f54970d.l);
}
@Override
public void a(Bundle bundle) {
}
@Override
public void a(Bundle bundle, Object obj) {
super.a(bundle, obj);
if (this.f54970d != null) {
this.f54970d.b();
this.f54970d.a(c());
}
}
@Override
public void a(QBWebView qBWebView, int i, String str, String str2) {
}
@Override
public boolean a(int i, String str, String str2, boolean z) {
if (this.f != null) {
this.f.a(i, str, str2);
if (i == 1) {
this.f.a(!z, (Integer) null);
this.f.setBackgroundNormalIds(0, z ? R.color.novel_common_d2 : this.f.d());
}
}
return true;
}
String c() {
NovelSysConfig l = getNovelContext().l();
String str = l != null ? l.strBookListUrl : "";
if (TextUtils.isEmpty(str)) {
str = "https://nc.html5.qq.com/";
}
Bundle initBundle = getInitBundle();
ArrayList<String> stringArrayList = initBundle != null ? initBundle.getStringArrayList("share_bids") : null;
StringBuilder sb = new StringBuilder("bids");
sb.append(ContainerUtils.KEY_VALUE_DELIMITER);
if (stringArrayList != null) {
for (int i = 0; i < stringArrayList.size(); i++) {
if (i != 0) {
sb.append(Constants.ACCEPT_TIME_SEPARATOR_SERVER);
}
sb.append(stringArrayList.get(i));
}
}
return UrlUtils.addParamsToUrl(UrlUtils.addParamsToUrl(str, sb.toString()), "ch=001319");
}
@Override
public boolean can(int i) {
return i == 4 || i == 5 || i == 8;
}
@Override
public String getSceneTag() {
return "NovelListSharePage";
}
@Override
public String getUrl() {
return c();
}
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
if (view.getId() == 1) {
getNativeGroup().back(false);
}
EventCollector.getInstance().onViewClicked(view);
}
}