QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 DocScanTipsView.java 源代码,内容仅作参考
package com.tencent.mtt.docscan.camera;
import android.content.Context;
import android.graphics.Color;
import android.text.TextPaint;
import android.text.TextUtils;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.tencent.mtt.R;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.docscan.camera.export.DocScanTabItem;
import com.tencent.mtt.docscan.pagebase.AspectRatioLayout;
import com.tencent.mtt.file.pagecommon.viewext.ViewExtKt;
import kotlin.jvm.internal.Intrinsics;
public final class DocScanTipsView extends LinearLayout {
private final QBWebImageView f48689a;
private final TextView f48690b;
private final TextView f48691c;
private DocScanTabItem f48692d;
public final class WhenMappings {
public static final int[] f48693a = new int[DocScanTabItem.values().length];
static {
f48693a[DocScanTabItem.BankCard.ordinal()] = 1;
f48693a[DocScanTabItem.IDCard.ordinal()] = 2;
f48694b = new int[DocScanTabItem.values().length];
f48694b[DocScanTabItem.IDCard.ordinal()] = 1;
f48694b[DocScanTabItem.BankCard.ordinal()] = 2;
f48694b[DocScanTabItem.HouseholdRegister.ordinal()] = 3;
f48694b[DocScanTabItem.DrivingLicense.ordinal()] = 4;
f48694b[DocScanTabItem.Passport.ordinal()] = 5;
f48694b[DocScanTabItem.VehicleLicense.ordinal()] = 6;
f48694b[DocScanTabItem.PropertyOwnershipCertificate.ordinal()] = 7;
f48694b[DocScanTabItem.CertificateOfDegree.ordinal()] = 8;
f48694b[DocScanTabItem.CertificateOfGraduation.ordinal()] = 9;
}
}
public DocScanTipsView(Context context) {
super(context);
Intrinsics.checkParameterIsNotNull(context, "context");
this.f48689a = new QBWebImageView(context);
this.f48690b = new TextView(context);
this.f48691c = new TextView(context);
setClickable(true);
setOrientation(1);
this.f48689a.setUseMaskForNightMode(false);
this.f48689a.setEnableNoPicMode(false);
this.f48689a.setPlaceHolderDrawableId(R.drawable.jg);
AspectRatioLayout aspectRatioLayout = new AspectRatioLayout(context, null, 0, 6, null);
aspectRatioLayout.setAspectRatio(1.0f);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.leftMargin = ViewExtKt.b(16);
layoutParams.rightMargin = ViewExtKt.b(16);
layoutParams.topMargin = ViewExtKt.b(16);
addView(aspectRatioLayout, layoutParams);
aspectRatioLayout.addView(this.f48689a, new LinearLayout.LayoutParams(-1, -1));
this.f48690b.setEllipsize(TextUtils.TruncateAt.END);
ViewExtKt.a(this.f48690b, 12);
this.f48690b.setTextColor(Color.parseColor("#666666"));
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -2);
layoutParams2.topMargin = ViewExtKt.b(16);
layoutParams2.leftMargin = ViewExtKt.b(16);
layoutParams2.rightMargin = ViewExtKt.b(16);
layoutParams2.gravity = 1;
addView(this.f48690b, layoutParams2);
this.f48691c.setMaxLines(1);
this.f48691c.setEllipsize(TextUtils.TruncateAt.END);
this.f48691c.setTextColor(Color.parseColor("#006EF2"));
ViewExtKt.a(this.f48691c, 14);
this.f48691c.setGravity(1);
TextPaint paint = this.f48691c.getPaint();
Intrinsics.checkExpressionValueIsNotNull(paint, "buttonTv.paint");
paint.setFakeBoldText(true);
LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-1, ViewExtKt.b(22));
layoutParams3.topMargin = ViewExtKt.b(16);
layoutParams3.bottomMargin = ViewExtKt.b(16);
layoutParams3.gravity = 1;
addView(this.f48691c, layoutParams3);
setBackground(getResources().getDrawable(R.drawable.jh));
}
private final String b(DocScanTabItem docScanTabItem) {
StringBuilder sb;
String str;
int i = WhenMappings.f48693a[docScanTabItem.ordinal()];
if (i == 1 || i == 2) {
sb = new StringBuilder();
sb.append("扫描");
sb.append(docScanTabItem.getItemName());
str = "智能拼接正反面,办事更加方便。证件信息仅用作本地存储,内容不会被识别和使用。";
} else {
sb = new StringBuilder();
sb.append("扫描");
sb.append(docScanTabItem == DocScanTabItem.Other ? "证件" : docScanTabItem.getItemName());
str = "自动生成A4版式,办事更加方便。证件信息仅用作本地存储,内容不会被识别和使用。";
}
sb.append(str);
return sb.toString();
}
private final String c(DocScanTabItem docScanTabItem) {
switch (docScanTabItem) {
case IDCard:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/id_card.png";
case BankCard:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/bank_card.png";
case HouseholdRegister:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/house_register.png";
case DrivingLicense:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/driving_license.png";
case Passport:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/passport.png";
case VehicleLicense:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/vehicle_license.png";
case PropertyOwnershipCertificate:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/property_ownership.png";
case CertificateOfDegree:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/dgree.png";
case CertificateOfGraduation:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/graduation.png";
default:
return "https://m4.publicimg.browser.qq.com/publicimg/nav/certificate_scan/direct/other.png";
}
}
public final void a(DocScanTabItem docScanTabItem) {
Intrinsics.checkParameterIsNotNull(docScanTabItem, "docScanTabItem");
this.f48692d = docScanTabItem;
this.f48689a.setUrl(c(docScanTabItem));
this.f48690b.setText(b(docScanTabItem));
this.f48691c.setText("立即制作");
}
public final TextView getButtonTv() {
return this.f48691c;
}
public final DocScanTabItem getDocScanTabItem() {
DocScanTabItem docScanTabItem = this.f48692d;
if (docScanTabItem == null) {
Intrinsics.throwUninitializedPropertyAccessException("docScanTabItem");
}
return docScanTabItem;
}
public final QBWebImageView getImageView() {
return this.f48689a;
}
public final TextView getTipsTv() {
return this.f48690b;
}
}