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

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


package com.tencent.mtt.fileclean.page.video;

import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.tencent.mtt.R;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.log.access.Logs;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import kotlin.jvm.internal.Intrinsics;

public class RewardVideoViewImpl implements RewardVideoView {

    private final View f66084a;

    private final TextView f66085b;

    private final TextView f66086c;

    private final TextView f66087d;
    private final ImageView e;
    private final View f;
    private final ImageView g;
    private final TextView h;
    private final TextView i;
    private final TextView j;
    private final QBWebImageView k;
    private final ViewGroup l;
    private final RewardVideoWindow m;

    public RewardVideoViewImpl(ViewGroup container, RewardVideoWindow rewardVideoWindow) {
        Intrinsics.checkParameterIsNotNull(container, "container");
        Intrinsics.checkParameterIsNotNull(rewardVideoWindow, "rewardVideoWindow");
        this.l = container;
        this.m = rewardVideoWindow;
        this.f66084a = LayoutInflater.from(this.l.getContext()).inflate(R.layout.ub, this.l, false);
        this.f66085b = (TextView) this.f66084a.findViewById(R.id.viewTitle);
        this.f66086c = (TextView) this.f66084a.findViewById(R.id.textGoldCount);
        this.f66087d = (TextView) this.f66084a.findViewById(R.id.btnBottom);
        this.e = (ImageView) this.f66084a.findViewById(R.id.btnClose);
        this.f = LayoutInflater.from(this.l.getContext()).inflate(R.layout.uc, this.l, false);
        this.g = (ImageView) this.f.findViewById(R.id.btnClose);
        this.h = (TextView) this.f.findViewById(R.id.btnBottom);
        this.i = (TextView) this.f.findViewById(R.id.textFlag);
        this.j = (TextView) this.f.findViewById(R.id.textGold);
        this.k = (QBWebImageView) this.f.findViewById(R.id.iconReward);
        this.e.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                RewardVideoViewImpl.this.c();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        this.g.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                RewardVideoViewImpl.this.c();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        this.h.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                RewardVideoViewImpl.this.c();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        QBWebImageView iconReward = this.k;
        Intrinsics.checkExpressionValueIsNotNull(iconReward, "iconReward");
        iconReward.setUrl("https://m4.publicimg.browser.qq.com/publicimg/nav/file/junk_clean_icon_reward.png");
        this.k.setPlaceHolderDrawable(null);
        try {
            Context context = this.l.getContext();
            Intrinsics.checkExpressionValueIsNotNull(context, "container.context");
            Typeface createFromAsset = Typeface.createFromAsset(context.getAssets(), "DINNextLTPro-Medium.ttf");
            TextView textGoldCount = this.f66086c;
            Intrinsics.checkExpressionValueIsNotNull(textGoldCount, "textGoldCount");
            textGoldCount.setTypeface(createFromAsset);
            TextView textGold = this.j;
            Intrinsics.checkExpressionValueIsNotNull(textGold, "textGold");
            textGold.setTypeface(createFromAsset);
            TextView textFlag = this.i;
            Intrinsics.checkExpressionValueIsNotNull(textFlag, "textFlag");
            textFlag.setTypeface(createFromAsset);
        } catch (RuntimeException unused) {
            Logs.e("RewardVideoViewImpl", "字体加载失败");
        }
    }

    public final void c() {
        View normalTaskView = this.f66084a;
        Intrinsics.checkExpressionValueIsNotNull(normalTaskView, "normalTaskView");
        if (normalTaskView.getParent() != null) {
            this.l.removeView(this.f66084a);
        }
        View receivedGoldView = this.f;
        Intrinsics.checkExpressionValueIsNotNull(receivedGoldView, "receivedGoldView");
        if (receivedGoldView.getParent() != null) {
            this.l.removeView(this.f);
        }
    }

    @Override
    public void a(int i) {
        View normalTaskView = this.f66084a;
        Intrinsics.checkExpressionValueIsNotNull(normalTaskView, "normalTaskView");
        if (normalTaskView.getParent() != null) {
            this.l.removeView(this.f66084a);
        }
        TextView taskTitle = this.f66085b;
        Intrinsics.checkExpressionValueIsNotNull(taskTitle, "taskTitle");
        taskTitle.setText("恭喜获得领金币机会");
        TextView textGoldCount = this.f66086c;
        Intrinsics.checkExpressionValueIsNotNull(textGoldCount, "textGoldCount");
        textGoldCount.setText(String.valueOf(i));
        TextView btnBottom = this.f66087d;
        Intrinsics.checkExpressionValueIsNotNull(btnBottom, "btnBottom");
        btnBottom.setText("看视频领" + i + "金币");
        this.l.addView(this.f66084a);
        this.f66087d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RewardVideoWindow rewardVideoWindow;
                EventCollector.getInstance().onViewClickedBefore(view);
                rewardVideoWindow = RewardVideoViewImpl.this.m;
                rewardVideoWindow.d();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
    }

    @Override
    public boolean a() {
        boolean z;
        View normalTaskView = this.f66084a;
        Intrinsics.checkExpressionValueIsNotNull(normalTaskView, "normalTaskView");
        if (normalTaskView.getParent() != null) {
            this.l.removeView(this.f66084a);
            z = true;
        } else {
            z = false;
        }
        View receivedGoldView = this.f;
        Intrinsics.checkExpressionValueIsNotNull(receivedGoldView, "receivedGoldView");
        if (receivedGoldView.getParent() == null) {
            return z;
        }
        this.l.removeView(this.f);
        return true;
    }

    public final void b() {
        View normalTaskView = this.f66084a;
        Intrinsics.checkExpressionValueIsNotNull(normalTaskView, "normalTaskView");
        if (normalTaskView.getParent() != null) {
            this.l.removeView(this.f66084a);
        }
    }

    public final void b(final int i) {
        View normalTaskView = this.f66084a;
        Intrinsics.checkExpressionValueIsNotNull(normalTaskView, "normalTaskView");
        if (normalTaskView.getParent() == null) {
            this.l.addView(this.f66084a);
        }
        TextView taskTitle = this.f66085b;
        Intrinsics.checkExpressionValueIsNotNull(taskTitle, "taskTitle");
        taskTitle.setText("任务完成");
        TextView btnBottom = this.f66087d;
        Intrinsics.checkExpressionValueIsNotNull(btnBottom, "btnBottom");
        btnBottom.setText("领取奖励");
        this.f66087d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RewardVideoWindow rewardVideoWindow;
                EventCollector.getInstance().onViewClickedBefore(view);
                rewardVideoWindow = RewardVideoViewImpl.this.m;
                rewardVideoWindow.a(i);
                EventCollector.getInstance().onViewClicked(view);
            }
        });
    }

    public final void c(int i) {
        View normalTaskView = this.f66084a;
        Intrinsics.checkExpressionValueIsNotNull(normalTaskView, "normalTaskView");
        if (normalTaskView.getParent() != null) {
            this.l.removeView(this.f66084a);
        }
        View receivedGoldView = this.f;
        Intrinsics.checkExpressionValueIsNotNull(receivedGoldView, "receivedGoldView");
        if (receivedGoldView.getParent() == null) {
            this.l.addView(this.f);
        }
        TextView textGold = this.j;
        Intrinsics.checkExpressionValueIsNotNull(textGold, "textGold");
        textGold.setText(String.valueOf(i));
    }
}