QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 UserItemView.java 源代码,内容仅作参考
package com.tencent.mtt.file.page.toolc.resume.list;
import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.file.page.toolc.resume.ExtensionsKt;
import com.tencent.mtt.file.page.toolc.resume.model.User;
import java.io.File;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
public final class UserItemView extends RelativeLayout {
private TextView f62981a;
private TextView f62982b;
private TextView f62983c;
private TextView f62984d;
private QBWebImageView e;
public UserItemView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
private final void a() {
List listOf = CollectionsKt.listOf((Object[]) new Integer[]{Integer.valueOf(MttResources.s(20)), Integer.valueOf(MttResources.s(100)), Integer.valueOf(MttResources.s(157))});
for (int i = 0; i <= 2; i++) {
QBWebImageView qBWebImageView = new QBWebImageView(getContext());
qBWebImageView.setUrl("https://m4.publicimg.browser.qq.com/publicimg/nav/file/toolc_text_drawable_start.png");
qBWebImageView.setScaleType(ImageView.ScaleType.FIT_XY);
int s = MttResources.s(10);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(s, s);
layoutParams.leftMargin = MttResources.s(10);
layoutParams.topMargin = ((Number) listOf.get(i)).intValue();
addView(qBWebImageView, layoutParams);
}
this.e = new QBWebImageView(getContext());
QBWebImageView qBWebImageView2 = this.e;
if (qBWebImageView2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView2.setScaleType(ImageView.ScaleType.FIT_XY);
QBWebImageView qBWebImageView3 = this.e;
if (qBWebImageView3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView3.setRadius(MttResources.s(4));
QBWebImageView qBWebImageView4 = this.e;
if (qBWebImageView4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView4.setBorderWidth(2);
QBWebImageView qBWebImageView5 = this.e;
if (qBWebImageView5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView5.setBorderColor(Color.parseColor("#33000000"));
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(MttResources.s(72), MttResources.s(100));
layoutParams2.rightMargin = MttResources.s(17);
layoutParams2.addRule(21);
QBWebImageView qBWebImageView6 = this.e;
if (qBWebImageView6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
addView(qBWebImageView6, layoutParams2);
}
public final void a(User user) {
Intrinsics.checkParameterIsNotNull(user, "user");
TextView textView = this.f62981a;
if (textView == null) {
Intrinsics.throwUninitializedPropertyAccessException("nameTv");
}
textView.setText(user.userName);
TextView textView2 = this.f62982b;
if (textView2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("briefTv");
}
String str = user.sexuality;
Intrinsics.checkExpressionValueIsNotNull(str, "user.sexuality");
String str2 = user.birth;
Intrinsics.checkExpressionValueIsNotNull(str2, "user.birth");
textView2.setText(ExtensionsKt.a(str, str2, 0, 4, (Object) null));
TextView textView3 = this.f62983c;
if (textView3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("phoneTv");
}
textView3.setText(user.phone);
TextView textView4 = this.f62984d;
if (textView4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("emailTv");
}
textView4.setText(user.email);
String str3 = user.avatarPath;
if ((str3 == null || str3.length() == 0) || !new File(user.avatarPath).exists()) {
QBWebImageView qBWebImageView = this.e;
if (qBWebImageView == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView.setVisibility(8);
return;
}
QBWebImageView qBWebImageView2 = this.e;
if (qBWebImageView2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView2.setVisibility(0);
QBWebImageView qBWebImageView3 = this.e;
if (qBWebImageView3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("avatarIv");
}
qBWebImageView3.setUrl("file://" + user.avatarPath);
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
View findViewById = findViewById(R.id.user_name);
Intrinsics.checkExpressionValueIsNotNull(findViewById, "findViewById(R.id.user_name)");
this.f62981a = (TextView) findViewById;
View findViewById2 = findViewById(R.id.brief);
Intrinsics.checkExpressionValueIsNotNull(findViewById2, "findViewById(R.id.brief)");
this.f62982b = (TextView) findViewById2;
View findViewById3 = findViewById(R.id.phone_num);
Intrinsics.checkExpressionValueIsNotNull(findViewById3, "findViewById(R.id.phone_num)");
this.f62983c = (TextView) findViewById3;
View findViewById4 = findViewById(R.id.email);
Intrinsics.checkExpressionValueIsNotNull(findViewById4, "findViewById(R.id.email)");
this.f62984d = (TextView) findViewById4;
a();
}
}