QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 AppCleanHeaderView.java 源代码,内容仅作参考
package com.tencent.mtt.fileclean.appclean.common;
import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.tencent.common.http.Apn;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.fileclean.utils.JunkFileUtils;
import com.tencent.mtt.newskin.SimpleSkinBuilder;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.mtt.view.layout.QBLinearLayout;
import qb.a.e;
import qb.a.g;
public class AppCleanHeaderView extends QBLinearLayout {
protected Context f65090a;
int f65091b;
QBTextView f65092c;
QBTextView f65093d;
QBTextView e;
QBWebImageView f;
public AppCleanHeaderView(Context context, int i) {
super(context);
this.f65090a = context;
this.f65091b = i;
a();
}
private void a() {
int s;
setOrientation(0);
QBLinearLayout qBLinearLayout = new QBLinearLayout(this.f65090a);
qBLinearLayout.setOrientation(0);
qBLinearLayout.setGravity(17);
this.f65092c = new QBTextView(this.f65090a);
this.f65092c.setTextSize(MttResources.s(40));
this.f65092c.setText("0");
this.f65092c.setTextColor(MttResources.c(e.r));
qBLinearLayout.addView(this.f65092c, new ViewGroup.LayoutParams(-2, -2));
QBLinearLayout qBLinearLayout2 = new QBLinearLayout(this.f65090a);
qBLinearLayout2.setOrientation(1);
this.f65093d = new QBTextView(this.f65090a);
this.f65093d.setTextSize(MttResources.s(14));
this.f65093d.setText("B");
this.f65093d.setTextColor(MttResources.c(e.r));
this.f65093d.setAlpha(0.6f);
qBLinearLayout2.addView(this.f65093d);
this.e = new QBTextView(this.f65090a);
this.e.setTextSize(MttResources.s(14));
this.e.setTextColor(MttResources.c(e.r));
qBLinearLayout2.addView(this.e, new LinearLayout.LayoutParams(-2, -2));
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
layoutParams.leftMargin = MttResources.s(6);
qBLinearLayout.addView(qBLinearLayout2, layoutParams);
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -1);
layoutParams2.weight = 1.0f;
addView(qBLinearLayout, layoutParams2);
if (Apn.isNetworkAvailable()) {
this.f = new QBWebImageView(this.f65090a);
this.f.setPlaceHolderDrawableId(g.f85882a);
this.f.setUrl(getIconUrl());
SimpleSkinBuilder.a((ImageView) this.f).f();
s = MttResources.s(122);
addView(this.f, new LinearLayout.LayoutParams(MttResources.s(140), s));
} else {
s = MttResources.s(78);
}
setLayoutParams(new ViewGroup.LayoutParams(-1, s));
}
private String getIconUrl() {
int i = this.f65091b;
return i == 1 ? "https://res.imtt.qq.com/res_mtt/file/9.9/wx_clean_transparent_logo.png" : i == 2 ? "https://res.imtt.qq.com/res_mtt/file/9.9/qq_clean_transparent_logo.png" : i == 3 ? "https://res.imtt.qq.com/res_mtt/file/9.9/qb_clean_transparent_logo.png" : i == 5 ? "https://res.imtt.qq.com/res_mtt/file/9.9/video_clean_transparent_logo.png" : "";
}
public void setBgColor(int i) {
setBackgroundColor(MttResources.c(i));
}
public void setJunkSize(long j) {
this.f65092c.setText(JunkFileUtils.a(j));
this.f65093d.setText(JunkFileUtils.c(j));
}
public void setTipText(String str) {
this.e.setText(str);
}
}