QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 ResultPageBottomLoadingView.java 源代码,内容仅作参考
package com.tencent.mtt.file.page.doctranslate.resultpage;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.LinearLayout;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.mtt.view.layout.QBLinearLayout;
import qb.a.e;
import qb.a.g;
public class ResultPageBottomLoadingView extends QBLinearLayout {
QBTextView f60578a;
private QBWebImageView f60579b;
private ObjectAnimator f60580c;
private boolean f60581d;
public ResultPageBottomLoadingView(Context context) {
super(context);
c();
}
private void c() {
setOrientation(0);
View view = new View(getContext());
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
layoutParams.weight = 1.0f;
addView(view, layoutParams);
this.f60579b = new QBWebImageView(getContext());
this.f60579b.setPlaceHolderDrawableId(g.f85882a);
this.f60579b.setEnableNoPicMode(false);
this.f60579b.setUseMaskForNightMode(true);
this.f60579b.setUrl("https://static.res.qq.com/qbt/process/loading.png");
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(MttResources.s(16), MttResources.s(16));
layoutParams2.rightMargin = MttResources.s(6);
layoutParams2.gravity = 17;
addView(this.f60579b, layoutParams2);
this.f60578a = new QBTextView(getContext());
this.f60578a.setIncludeFontPadding(false);
this.f60578a.setTextColorNormalIds(e.f);
this.f60578a.setTextSize(0, MttResources.s(14));
this.f60578a.setGravity(17);
LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(MttResources.s(42), -1);
layoutParams3.gravity = 17;
addView(this.f60578a, layoutParams3);
QBTextView qBTextView = new QBTextView(getContext());
qBTextView.setIncludeFontPadding(false);
qBTextView.setTextColor(Color.parseColor("#FF8F8F8F"));
qBTextView.setTextSize(0, MttResources.s(14));
qBTextView.setText("翻译完后即可下载");
qBTextView.setGravity(17);
LinearLayout.LayoutParams layoutParams4 = new LinearLayout.LayoutParams(-2, -1);
layoutParams4.gravity = 17;
addView(qBTextView, layoutParams4);
View view2 = new View(getContext());
LinearLayout.LayoutParams layoutParams5 = new LinearLayout.LayoutParams(-1, -1);
layoutParams5.weight = 1.0f;
addView(view2, layoutParams5);
if (this.f60581d) {
a();
}
}
protected void a() {
b();
float rotation = this.f60579b.getRotation();
this.f60580c = ObjectAnimator.ofFloat(this.f60579b, "rotation", rotation, rotation + 360.0f).setDuration(1200L);
this.f60580c.setInterpolator(new LinearInterpolator());
this.f60580c.setRepeatCount(-1);
this.f60580c.start();
}
protected void b() {
ObjectAnimator objectAnimator = this.f60580c;
if (objectAnimator != null) {
objectAnimator.cancel();
this.f60580c = null;
}
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
this.f60581d = true;
a();
}
@Override
protected void onDetachedFromWindow() {
this.f60581d = false;
b();
super.onDetachedFromWindow();
}
public void setLoadingText(String str) {
this.f60578a.setText(str);
}
}