QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685

以下内容为反编译后的 FilePageLoadingView.java 源代码,内容仅作参考


package com.tencent.mtt.nxeasy.uibase;

import android.animation.ObjectAnimator;
import android.content.Context;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
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 FilePageLoadingView extends QBLinearLayout {

    private int f68961a;

    private int f68962b;

    private QBWebImageView f68963c;

    private QBTextView f68964d;
    private ObjectAnimator e;
    private String f;
    private boolean g;

    public FilePageLoadingView(Context context) {
        super(context);
        this.f68961a = MttResources.s(61);
        this.f68962b = MttResources.s(16);
        setOrientation(1);
        setGravity(17);
        a();
    }

    private void a() {
        removeAllViews();
        if (this.f68963c == null) {
            this.f68963c = new QBWebImageView(getContext());
            this.f68963c.setPlaceHolderDrawableId(g.f85882a);
            this.f68963c.setUseMaskForNightMode(true);
            this.f68963c.setUrl("https://static.res.qq.com/qbt/process/loading.png");
            SimpleSkinBuilder.a((ImageView) this.f68963c).f();
        }
        QBWebImageView qBWebImageView = this.f68963c;
        int i = this.f68961a;
        addView(qBWebImageView, new LinearLayout.LayoutParams(i, i));
        if (this.f68964d == null) {
            this.f68964d = new QBTextView(getContext());
            this.f68964d.setIncludeFontPadding(false);
            this.f68964d.setPadding(0, MttResources.s(15), 0, 0);
            this.f68964d.setTextColorNormalIds(e.ax);
        }
        this.f68964d.setTextSize(0, this.f68962b);
        this.f68964d.setText(this.f);
        addView(this.f68964d, new LinearLayout.LayoutParams(-2, -2));
        if (this.g) {
            b();
        }
    }

    private void b() {
        c();
        float rotation = this.f68963c.getRotation();
        this.e = ObjectAnimator.ofFloat(this.f68963c, "rotation", rotation, rotation + 360.0f).setDuration(1200L);
        this.e.setInterpolator(new LinearInterpolator());
        this.e.setRepeatCount(-1);
        this.e.start();
    }

    private void c() {
        ObjectAnimator objectAnimator = this.e;
        if (objectAnimator != null) {
            objectAnimator.cancel();
            this.e = null;
        }
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        this.g = true;
        b();
    }

    @Override
    protected void onDetachedFromWindow() {
        this.g = false;
        c();
        super.onDetachedFromWindow();
    }

    public void setLoadingSize(int i) {
        this.f68961a = i;
    }

    public void setLoadingText(String str) {
        this.f = str;
        this.f68964d.setText(str);
    }

    public void setTextSize(int i) {
        this.f68962b = i;
    }
}