QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 CameraTopicUsagePage.java 源代码,内容仅作参考
package com.tencent.mtt.external.explorerone.camera.page;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.tencent.common.http.Apn;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.base.utils.NotchUtil;
import com.tencent.mtt.browser.window.IPage;
import com.tencent.mtt.browser.window.IWebView;
import com.tencent.mtt.browser.window.PageFrame;
import com.tencent.mtt.browser.window.WindowManager;
import com.tencent.mtt.external.explorerone.camera.CameraExplorerContainer;
import com.tencent.mtt.external.explorerone.camera.CameraNativePageBase;
import com.tencent.mtt.external.explorerone.camera.utils.CameraStatConst;
import com.tencent.mtt.setting.BaseSettings;
import com.tencent.mtt.view.common.QBImageView;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.mtt.view.layout.QBFrameLayout;
import com.tencent.mtt.view.layout.QBLinearLayout;
import com.tencent.mtt.view.scrollview.QBScrollView;
import com.tencent.mtt.view.toast.MttToaster;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import qb.a.e;
import qb.a.f;
public class CameraTopicUsagePage extends CameraNativePageBase implements View.OnClickListener {
private static final int l = MttResources.g(f.U);
private static final int m = MttResources.g(f.v);
private static final int n = MttResources.g(f.f);
private Paint h;
private QBImageView i;
private QBTextView j;
private QBWebImageView k;
private boolean o;
public CameraTopicUsagePage(Context context, CameraExplorerContainer cameraExplorerContainer) {
super(context, cameraExplorerContainer);
this.i = null;
this.j = null;
this.k = null;
this.o = false;
a();
}
private void a() {
setBackgroundNormalIds(0, R.color.white);
this.h = new Paint();
QBFrameLayout qBFrameLayout = new QBFrameLayout(getContext()) {
@Override
public void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
CameraTopicUsagePage.this.h.setColor(MttResources.c(R.color.jm));
CameraTopicUsagePage.this.h.setStrokeWidth(1);
canvas.drawLine(0.0f, getMeasuredHeight() - 1, getMeasuredWidth(), getMeasuredHeight() - 1, CameraTopicUsagePage.this.h);
}
};
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, l);
layoutParams.gravity = 48;
layoutParams.topMargin = (!BaseSettings.a().l() || NotchUtil.a(ContextHolder.getAppContext())) ? BaseSettings.a().m() : 0;
addView(qBFrameLayout, layoutParams);
this.i = new QBImageView(getContext());
this.i.setImageNormalPressIds(R.drawable.aap, R.color.jr, 0, e.ag);
this.i.setOnClickListener(this);
this.i.setId(1);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(-2, -2, 3);
this.i.setPadding(m, 0, n, 0);
layoutParams2.gravity = 16;
qBFrameLayout.addView(this.i, layoutParams2);
this.j = new QBTextView(getContext().getApplicationContext());
this.j.setTextColor(MttResources.c(R.color.jr));
this.j.setTextSize(MttResources.h(f.da));
this.j.setGravity(17);
this.j.setText(MttResources.l(R.string.th));
this.j.setSingleLine(true);
this.j.setEllipsize(TextUtils.TruncateAt.END);
FrameLayout.LayoutParams layoutParams3 = new FrameLayout.LayoutParams(-2, -2);
layoutParams3.gravity = 17;
qBFrameLayout.addView(this.j, layoutParams3);
final QBLinearLayout qBLinearLayout = new QBLinearLayout(getContext());
qBLinearLayout.setOrientation(1);
qBLinearLayout.setGravity(1);
ViewGroup.MarginLayoutParams marginLayoutParams = new ViewGroup.MarginLayoutParams(-1, -2);
QBScrollView qBScrollView = new QBScrollView(getContext()) {
@Override
public void onScrollChanged(int i, int i2, int i3, int i4) {
super.onScrollChanged(i, i2, i3, i4);
if (qBLinearLayout.getHeight() - getHeight() != getCurrentOffset() || CameraTopicUsagePage.this.o) {
return;
}
CameraTopicUsagePage.this.o = true;
CameraStatConst.b("BZST043");
}
};
qBScrollView.addView(qBLinearLayout, marginLayoutParams);
qBScrollView.setUseMaskForNightMode(false);
FrameLayout.LayoutParams layoutParams4 = new FrameLayout.LayoutParams(-1, -1);
layoutParams4.topMargin = l + ((!BaseSettings.a().l() || NotchUtil.a(ContextHolder.getAppContext())) ? BaseSettings.a().m() : 0);
addView(qBScrollView, layoutParams4);
this.k = new QBWebImageView(getContext());
this.k.setUseNightModeMask(false);
this.k.setUseMaskForNightMode(false);
this.k.setCustomMaskColor(0);
this.k.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
this.k.setLayoutParams(new LinearLayout.LayoutParams(-1, MttResources.s(946)));
qBLinearLayout.addView(this.k);
this.k.setUrl("https://res.imtt.qq.com/camera/camera_topic_usage_8.8.png");
}
@Override
public void active() {
super.active();
if (Apn.isNetworkConnected()) {
return;
}
MttToaster.show(MttResources.l(R.string.st), 0);
}
@Override
public void deactive() {
super.deactive();
}
@Override
public void destroy() {
super.destroy();
}
@Override
public boolean edgeBackforward() {
return false;
}
@Override
public IPage.INSTANT_TYPE getInstType() {
return IPage.INSTANT_TYPE.SIGLE_TYPE_IN_GLOBAL;
}
@Override
public IPage.POP_TYPE getPopType() {
return IPage.POP_TYPE.ONLY_SELF;
}
@Override
public boolean isForcePortalScreen() {
return true;
}
@Override
public boolean isNeedBackAnim() {
return false;
}
@Override
public void onClick(View view) {
PageFrame s;
EventCollector.getInstance().onViewClickedBefore(view);
if (view != null && view.getId() == 1 && (s = WindowManager.a().s()) != null) {
s.back(false);
}
EventCollector.getInstance().onViewClicked(view);
}
@Override
public IWebView.STATUS_BAR statusBarType() {
return IWebView.STATUS_BAR.NO_SHOW_DARK;
}
}