package com.bytedance.sdk.openadsdk.activity.single;

import android.R;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import b6.b;
import com.bytedance.sdk.component.ef.wsy;
import com.bytedance.sdk.component.utils.maa;
import com.bytedance.sdk.openadsdk.ApmHelper;
import com.bytedance.sdk.openadsdk.FilterWord;
import com.bytedance.sdk.openadsdk.common.TTAdDislikeToast;
import com.bytedance.sdk.openadsdk.common.duv;
import com.bytedance.sdk.openadsdk.common.fhx;
import com.bytedance.sdk.openadsdk.common.qhl;
import com.bytedance.sdk.openadsdk.core.fhx;
import com.bytedance.sdk.openadsdk.core.gof;
import com.bytedance.sdk.openadsdk.core.model.lse;
import com.bytedance.sdk.openadsdk.core.widget.PAGLogoView;
import com.bytedance.sdk.openadsdk.core.widget.onz;
import com.bytedance.sdk.openadsdk.utils.bx;
import com.bytedance.sdk.openadsdk.utils.ku;
import com.bytedance.sdk.openadsdk.utils.zan;
import com.bytedance.sdk.openadsdk.yz.dsz;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public class TTVideoLandingPageLink2Activity extends TTVideoLandingPageActivity {
    private boolean ado;
    private com.bytedance.sdk.openadsdk.common.jnr aws;
    private TextView bwv;
    TTAdDislikeToast kwx;
    private View mj;
    private duv mpp;

    /* JADX INFO: renamed from: ne, reason: collision with root package name */
    qhl f6776ne;
    private com.bytedance.sdk.openadsdk.core.widget.fm.ajl pbk;
    private long pcm;
    private PAGLogoView rka;
    private View vvj;
    private TextView ywr;
    private boolean so = false;
    final AtomicBoolean bkb = new AtomicBoolean(false);
    final AtomicBoolean lmk = new AtomicBoolean(false);

    /* JADX INFO: Access modifiers changed from: private */
    public void fhx() {
        com.bytedance.sdk.openadsdk.yz.lb.fm(this.onz, "landingpage_split_screen", "click_video", (JSONObject) null);
    }

    private void gqi() {
        try {
            if (this.f6776ne == null) {
                qhl qhlVar = new qhl(this.jnr, this.onz);
                this.f6776ne = qhlVar;
                qhlVar.setDislikeSource("landing_page");
                this.f6776ne.setCallback(new qhl.fm() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.4
                    @Override // com.bytedance.sdk.openadsdk.common.qhl.fm
                    public void fm(View view) {
                        TTVideoLandingPageLink2Activity.this.bkb.set(true);
                    }

                    @Override // com.bytedance.sdk.openadsdk.common.qhl.fm
                    public void ro(View view) {
                        TTVideoLandingPageLink2Activity.this.bkb.set(false);
                    }

                    @Override // com.bytedance.sdk.openadsdk.common.qhl.fm
                    public void fm(FilterWord filterWord) {
                        if (TTVideoLandingPageLink2Activity.this.lmk.get() || filterWord == null || filterWord.hasSecondOptions()) {
                            return;
                        }
                        TTVideoLandingPageLink2Activity.this.lmk.set(true);
                        TTVideoLandingPageLink2Activity.this.wey();
                    }
                });
            }
            FrameLayout frameLayout = (FrameLayout) findViewById(R.id.content);
            frameLayout.addView(this.f6776ne);
            if (this.kwx == null) {
                TTAdDislikeToast tTAdDislikeToast = new TTAdDislikeToast(this.jnr);
                this.kwx = tTAdDislikeToast;
                frameLayout.addView(tTAdDislikeToast);
            }
        } catch (Throwable th) {
            ApmHelper.reportCustomError("initDislike error", "TTVideoLandingPageLink2Activity", th);
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public void irt() {
        duv duvVar = this.mpp;
        if (duvVar != null) {
            duvVar.ro();
        }
    }

    private void qhl() {
        TTAdDislikeToast tTAdDislikeToast = this.kwx;
        if (tTAdDislikeToast == null) {
            return;
        }
        tTAdDislikeToast.show(TTAdDislikeToast.getDislikeTip());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public void wey() {
        TTAdDislikeToast tTAdDislikeToast;
        if (isFinishing() || (tTAdDislikeToast = this.kwx) == null) {
            return;
        }
        tTAdDislikeToast.show(TTAdDislikeToast.getDislikeSendTip());
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity
    public boolean ajl() {
        int i10 = this.ku;
        return i10 == 5 || i10 == 15 || i10 == 50;
    }

    public void dsz() {
        if (isFinishing()) {
            return;
        }
        if (this.lmk.get()) {
            qhl();
            return;
        }
        if (this.f6776ne == null) {
            gqi();
        }
        qhl qhlVar = this.f6776ne;
        if (qhlVar != null) {
            qhlVar.fm();
        }
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        duv duvVar = this.mpp;
        if (duvVar != null) {
            duvVar.fm();
        }
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity, com.bytedance.sdk.openadsdk.activity.single.TTBaseActivity, android.app.Activity
    public void onCreate(@Nullable Bundle bundle) {
        lse lseVar;
        com.bytedance.sdk.component.ef.wsy wsyVar;
        super.onCreate(bundle);
        if (!fhx.jnr() || (lseVar = this.onz) == null || (wsyVar = ((TTVideoLandingPageActivity) this).fm) == null) {
            finish();
            return;
        }
        com.bytedance.sdk.openadsdk.common.jnr jnrVarFm = bx.fm(lseVar, wsyVar, this.jnr, this.ai);
        this.aws = jnrVarFm;
        if (jnrVarFm != null) {
            jnrVarFm.fm("landingpage_split_screen");
        }
        if (((TTVideoLandingPageActivity) this).fm.getWebView() != null) {
            ((TTVideoLandingPageActivity) this).fm.getWebView().setOnScrollChangeListener(new View.OnScrollChangeListener() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.1
                @Override // android.view.View.OnScrollChangeListener
                public void onScrollChange(View view, int i10, int i11, int i12, int i13) {
                    dsz dszVar = TTVideoLandingPageLink2Activity.this.bx;
                    if (dszVar != null) {
                        dszVar.ro(i11);
                    }
                }
            });
        }
        com.bytedance.sdk.openadsdk.core.widget.fm.ajl ajlVar = new com.bytedance.sdk.openadsdk.core.widget.fm.ajl(this.jnr, this.wu, this.ajl, this.aws, this.bx, true) { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.5
            @Override // com.bytedance.sdk.openadsdk.core.widget.fm.ajl, android.webkit.WebViewClient
            public void onPageFinished(WebView webView, String str) {
                super.onPageFinished(webView, str);
                try {
                    if (TTVideoLandingPageLink2Activity.this.vvj != null && !TTVideoLandingPageLink2Activity.this.ado) {
                        TTVideoLandingPageLink2Activity.this.vvj.setVisibility(8);
                    }
                    TTVideoLandingPageLink2Activity.this.so = true;
                    TTVideoLandingPageLink2Activity.this.irt();
                    TTVideoLandingPageLink2Activity tTVideoLandingPageLink2Activity = TTVideoLandingPageLink2Activity.this;
                    com.bytedance.sdk.openadsdk.yz.lb.fm(tTVideoLandingPageLink2Activity.onz, tTVideoLandingPageLink2Activity.ai, System.currentTimeMillis() - TTVideoLandingPageLink2Activity.this.pcm, true);
                } catch (Throwable unused) {
                }
            }

            @Override // com.bytedance.sdk.openadsdk.core.widget.fm.ajl, android.webkit.WebViewClient
            public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
                super.onPageStarted(webView, str, bitmap);
                TTVideoLandingPageLink2Activity.this.pcm = System.currentTimeMillis();
            }
        };
        this.pbk = ajlVar;
        ajlVar.fm(this.onz);
        ((TTVideoLandingPageActivity) this).fm.setWebViewClient(this.pbk);
        ((TTVideoLandingPageActivity) this).fm.setWebChromeClient(new com.bytedance.sdk.openadsdk.core.widget.fm.jnr(this.wu, this.bx, this.aws) { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.6
            @Override // com.bytedance.sdk.openadsdk.core.widget.fm.jnr, android.webkit.WebChromeClient
            public void onProgressChanged(WebView webView, int i10) {
                super.onProgressChanged(webView, i10);
                if (TTVideoLandingPageLink2Activity.this.mpp != null) {
                    TTVideoLandingPageLink2Activity.this.mpp.fm(i10);
                }
            }
        });
        TextView textView = (TextView) findViewById(com.bytedance.sdk.openadsdk.utils.qhl.oj);
        if (textView != null && this.onz.hlt() != null) {
            textView.setText(this.onz.hlt().jnr());
        }
        lse lseVar2 = this.onz;
        fhx.lb().postDelayed(new Runnable() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.7
            @Override // java.lang.Runnable
            public void run() {
                try {
                    TTVideoLandingPageLink2Activity.this.ado = true;
                    if (TTVideoLandingPageLink2Activity.this.mpp != null) {
                        TTVideoLandingPageLink2Activity.this.mpp.ro();
                    }
                    TTVideoLandingPageLink2Activity.this.mj.setVisibility(0);
                    if (TTVideoLandingPageLink2Activity.this.rka != null) {
                        TTVideoLandingPageLink2Activity.this.rka.setVisibility(0);
                    }
                    if (TTVideoLandingPageLink2Activity.this.so) {
                        return;
                    }
                    TTVideoLandingPageLink2Activity tTVideoLandingPageLink2Activity = TTVideoLandingPageLink2Activity.this;
                    com.bytedance.sdk.openadsdk.yz.lb.fm(tTVideoLandingPageLink2Activity.onz, tTVideoLandingPageLink2Activity.ai, System.currentTimeMillis() - TTVideoLandingPageLink2Activity.this.pcm, false);
                } catch (Exception unused) {
                }
            }
        }, (lseVar2 == null || lseVar2.hlt() == null) ? 10000L : this.onz.hlt().fm() * 1000);
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity, com.bytedance.sdk.openadsdk.activity.single.TTBaseLandingPageActivity, com.bytedance.sdk.openadsdk.activity.single.TTBaseActivity, android.app.Activity
    public void onDestroy() {
        irt();
        if (!this.ado && this.bx != null && ((TTVideoLandingPageActivity) this).fm != null && this.mpp.getVisibility() == 8) {
            this.bx.fm(((TTVideoLandingPageActivity) this).fm);
        }
        super.onDestroy();
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity
    @SuppressLint({"ClickableViewAccessibility"})
    public void jnr() {
        if (!ajl()) {
            try {
                ImageView imageView = new ImageView(this);
                imageView.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
                imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
                com.bytedance.sdk.openadsdk.wey.ro.ro().fm(this.onz.pyj().get(0), imageView, this.onz);
                this.vt.setVisibility(0);
                this.vt.removeAllViews();
                this.vt.addView(imageView);
                imageView.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.3
                    @Override // android.view.View.OnClickListener
                    public void onClick(View view) {
                        com.bytedance.sdk.openadsdk.yz.lb.ro(TTVideoLandingPageLink2Activity.this.onz, "landingpage_split_screen");
                    }
                });
                return;
            } catch (Exception unused) {
                return;
            }
        }
        super.jnr();
        com.bytedance.sdk.openadsdk.core.fhx.ro.ajl ajlVar = this.duv;
        if (ajlVar != null) {
            if (ajlVar.getNativeVideoController() != null) {
                this.duv.getNativeVideoController().fm(false);
                this.duv.getNativeVideoController().ajl(false);
                this.vt.setClickable(true);
                this.vt.setOnTouchListener(new View.OnTouchListener() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.12
                    @Override // android.view.View.OnTouchListener
                    public boolean onTouch(View view, MotionEvent motionEvent) {
                        if (motionEvent.getAction() != 0) {
                            return false;
                        }
                        TTVideoLandingPageLink2Activity.this.fhx();
                        return false;
                    }
                });
            }
            this.duv.getNativeVideoController().fm(new b() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.2
                @Override // b6.b
                public void fm() {
                }

                @Override // b6.b
                public void ro(long j10, int i10) {
                }

                @Override // b6.b
                public void fm(long j10, int i10) {
                }

                @Override // b6.b
                public void fm(long j10, long j11) {
                    if (TTVideoLandingPageLink2Activity.this.bwv != null) {
                        int iMax = (int) Math.max(0L, (j11 - j10) / 1000);
                        TTVideoLandingPageLink2Activity.this.bwv.setText(String.valueOf(iMax));
                        if (iMax <= 0) {
                            TTVideoLandingPageLink2Activity.this.bwv.setVisibility(8);
                        }
                    }
                }
            });
        }
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity
    @SuppressLint({"ClickableViewAccessibility"})
    public void lb() {
        super.lb();
        TextView textView = (TextView) findViewById(520093713);
        if (textView != null) {
            textView.setText(maa.fm(gof.fm(), "tt_reward_feedback"));
            textView.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.9
                @Override // android.view.View.OnClickListener
                public void onClick(View view) {
                    TTVideoLandingPageLink2Activity.this.dsz();
                }
            });
        }
        this.bwv = (TextView) findViewById(520093714);
        this.mpp = (duv) findViewById(com.bytedance.sdk.openadsdk.utils.qhl.kwx);
        this.vvj = findViewById(com.bytedance.sdk.openadsdk.utils.qhl.f7561ne);
        this.mj = findViewById(com.bytedance.sdk.openadsdk.utils.qhl.xgn);
        TextView textView2 = (TextView) findViewById(com.bytedance.sdk.openadsdk.utils.qhl.lmk);
        TextView textView3 = (TextView) findViewById(com.bytedance.sdk.openadsdk.utils.qhl.mpp);
        com.bytedance.sdk.openadsdk.core.widget.qhl qhlVar = (com.bytedance.sdk.openadsdk.core.widget.qhl) findViewById(com.bytedance.sdk.openadsdk.utils.qhl.bkb);
        this.ywr = (TextView) findViewById(com.bytedance.sdk.openadsdk.utils.qhl.vvj);
        if (this.onz.ff() != null && !TextUtils.isEmpty(this.onz.ff().fm())) {
            com.bytedance.sdk.openadsdk.wey.ro.ro().fm(this.onz.ff(), qhlVar, this.onz);
        }
        textView2.setText(this.onz.wjb());
        textView3.setText(this.onz.nn());
        View viewFindViewById = findViewById(com.bytedance.sdk.openadsdk.utils.qhl.mj);
        viewFindViewById.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.10
            @Override // android.view.View.OnClickListener
            public void onClick(View view) {
                if (com.bytedance.sdk.openadsdk.utils.ro.jnr() && gof.yz().ai()) {
                    TTVideoLandingPageLink2Activity tTVideoLandingPageLink2Activity = TTVideoLandingPageLink2Activity.this;
                    IABLandingPageActivity.fm(tTVideoLandingPageLink2Activity.jnr, tTVideoLandingPageLink2Activity.onz, tTVideoLandingPageLink2Activity.ai);
                } else {
                    TTVideoLandingPageLink2Activity tTVideoLandingPageLink2Activity2 = TTVideoLandingPageLink2Activity.this;
                    TTWebsiteActivity.fm(tTVideoLandingPageLink2Activity2.jnr, tTVideoLandingPageLink2Activity2.onz, tTVideoLandingPageLink2Activity2.ai);
                }
            }
        });
        if (viewFindViewById instanceof PAGLogoView) {
            ((PAGLogoView) viewFindViewById).initData(this.onz);
        }
        com.bytedance.sdk.component.ef.wsy wsyVar = ((TTVideoLandingPageActivity) this).fm;
        if (wsyVar != null && wsyVar.getWebView() != null) {
            bx.fm(this.onz, ((TTVideoLandingPageActivity) this).fm);
        }
        if (((TTVideoLandingPageActivity) this).fm.getWebView() != null) {
            ((TTVideoLandingPageActivity) this).fm.getWebView().setOnTouchListener(new View.OnTouchListener() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.11
                @Override // android.view.View.OnTouchListener
                public boolean onTouch(View view, MotionEvent motionEvent) {
                    dsz dszVar = TTVideoLandingPageLink2Activity.this.bx;
                    if (dszVar != null) {
                        dszVar.fm(motionEvent);
                    }
                    if (TTVideoLandingPageLink2Activity.this.aws == null) {
                        return false;
                    }
                    TTVideoLandingPageLink2Activity.this.aws.fm(motionEvent);
                    return false;
                }
            });
        }
        duv duvVar = this.mpp;
        if (duvVar != null) {
            duvVar.fm(this.onz);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity
    @SuppressLint({"ClickableViewAccessibility"})
    public void vt() {
        super.vt();
        lse lseVar = this.onz;
        if (lseVar != null) {
            lseVar.onz(true);
        }
        TextView textView = this.ywr;
        if (textView != null) {
            textView.setText(ro());
            this.ywr.setClickable(true);
            this.ywr.setOnClickListener(this.f6772ib);
            this.ywr.setOnTouchListener(this.f6772ib);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageActivity
    public View fm() {
        com.bytedance.sdk.openadsdk.core.ajl.jnr jnrVar = new com.bytedance.sdk.openadsdk.core.ajl.jnr(this);
        if (Build.VERSION.SDK_INT >= 35) {
            jnrVar.setFitsSystemWindows(true);
        }
        jnrVar.setOrientation(1);
        jnrVar.setBackgroundColor(-1);
        com.bytedance.sdk.openadsdk.core.ajl.lb lbVar = new com.bytedance.sdk.openadsdk.core.ajl.lb(this);
        jnrVar.addView(lbVar, new LinearLayout.LayoutParams(-1, zan.ro(this, 220.0f)));
        View lbVar2 = new com.bytedance.sdk.openadsdk.core.ajl.lb(this);
        lbVar2.setId(com.bytedance.sdk.openadsdk.utils.qhl.mon);
        lbVar.addView(lbVar2, new FrameLayout.LayoutParams(-1, -1));
        com.bytedance.sdk.openadsdk.core.ajl.jnr jnrVar2 = new com.bytedance.sdk.openadsdk.core.ajl.jnr(this);
        jnrVar2.setOrientation(0);
        jnrVar2.setPadding(0, zan.ro(this, 20.0f), 0, 0);
        lbVar.addView(jnrVar2, new FrameLayout.LayoutParams(-1, -2));
        View view = new View(this);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, 0);
        layoutParams.weight = 1.0f;
        jnrVar2.addView(view, layoutParams);
        com.bytedance.sdk.openadsdk.core.widget.fhx fhxVar = new com.bytedance.sdk.openadsdk.core.widget.fhx(this);
        fhxVar.setId(520093713);
        fhxVar.setGravity(17);
        fhxVar.setText(maa.fm(this, "tt_reward_feedback"));
        fhxVar.setTextColor(-1);
        fhxVar.setTextSize(2, 14.0f);
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, zan.ro(this, 28.0f));
        int iRo = zan.ro(this, 16.0f);
        layoutParams2.rightMargin = iRo;
        layoutParams2.leftMargin = iRo;
        jnrVar2.addView(fhxVar, layoutParams2);
        onz onzVar = new onz(this);
        onzVar.setId(com.bytedance.sdk.openadsdk.utils.qhl.bx);
        onzVar.setPadding(zan.ro(this, 7.0f), zan.ro(this, 7.0f), zan.ro(this, 7.0f), zan.ro(this, 7.0f));
        onzVar.setImageResource(maa.yz(this, "tt_video_close_drawable"));
        LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(zan.ro(this, 28.0f), zan.ro(this, 28.0f));
        layoutParams3.rightMargin = zan.ro(this, 12.0f);
        jnrVar2.addView(onzVar, layoutParams3);
        com.bytedance.sdk.openadsdk.core.ajl.wsy wsyVar = new com.bytedance.sdk.openadsdk.core.ajl.wsy(this);
        wsyVar.setVisibility(8);
        wsyVar.setId(com.bytedance.sdk.openadsdk.utils.qhl.zan);
        LinearLayout.LayoutParams layoutParams4 = new LinearLayout.LayoutParams(-1, -2);
        layoutParams4.topMargin = zan.ro(this, 10.0f);
        jnrVar.addView(wsyVar, layoutParams4);
        com.bytedance.sdk.openadsdk.core.widget.fm fmVar = new com.bytedance.sdk.openadsdk.core.widget.fm(this);
        fmVar.setId(com.bytedance.sdk.openadsdk.utils.qhl.tzk);
        fmVar.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
        fmVar.setVisibility(8);
        RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams(zan.ro(this, 44.0f), zan.ro(this, 44.0f));
        layoutParams5.addRule(9);
        layoutParams5.leftMargin = zan.ro(this, 5.0f);
        wsyVar.addView(fmVar, layoutParams5);
        com.bytedance.sdk.openadsdk.core.ajl.wu wuVar = new com.bytedance.sdk.openadsdk.core.ajl.wu(this);
        int i10 = com.bytedance.sdk.openadsdk.utils.qhl.lz;
        wuVar.setId(i10);
        wuVar.setBackground(ku.fm(this, "tt_circle_solid_mian"));
        wuVar.setGravity(17);
        wuVar.setTextColor(-1);
        wuVar.setTextSize(2, 19.0f);
        wuVar.setTypeface(Typeface.DEFAULT_BOLD);
        RelativeLayout.LayoutParams layoutParams6 = new RelativeLayout.LayoutParams(zan.ro(this, 44.0f), zan.ro(this, 44.0f));
        layoutParams6.addRule(9);
        layoutParams6.leftMargin = zan.ro(this, 5.0f);
        wsyVar.addView(wuVar, layoutParams6);
        com.bytedance.sdk.openadsdk.core.ajl.wu wuVar2 = new com.bytedance.sdk.openadsdk.core.ajl.wu(this);
        wuVar2.setId(com.bytedance.sdk.openadsdk.utils.qhl.f7564qf);
        wuVar2.setMaxLines(1);
        TextUtils.TruncateAt truncateAt = TextUtils.TruncateAt.END;
        wuVar2.setEllipsize(truncateAt);
        wuVar2.setTextColor(Color.parseColor("#e5000000"));
        wuVar2.setTextSize(2, 12.0f);
        RelativeLayout.LayoutParams layoutParams7 = new RelativeLayout.LayoutParams(-2, -2);
        layoutParams7.addRule(15);
        layoutParams7.leftMargin = zan.ro(this, 5.0f);
        layoutParams7.rightMargin = zan.ro(this, 80.0f);
        layoutParams7.addRule(1, i10);
        wsyVar.addView(wuVar2, layoutParams7);
        com.bytedance.sdk.openadsdk.core.ajl.wu wuVar3 = new com.bytedance.sdk.openadsdk.core.ajl.wu(this);
        wuVar3.setId(com.bytedance.sdk.openadsdk.utils.qhl.si);
        wuVar3.setClickable(true);
        wuVar3.setMaxLines(1);
        wuVar3.setEllipsize(truncateAt);
        wuVar3.setFocusable(true);
        wuVar3.setGravity(17);
        wuVar3.setText(maa.fm(this, "tt_video_mobile_go_detail"));
        wuVar3.setTextColor(-1);
        wuVar3.setTextSize(2, 14.0f);
        wuVar3.setPadding(zan.ro(this, 2.0f), zan.ro(this, 2.0f), zan.ro(this, 2.0f), zan.ro(this, 2.0f));
        wuVar3.setBackground(ku.fm(this, "tt_ad_cover_btn_begin_bg"));
        RelativeLayout.LayoutParams layoutParams8 = new RelativeLayout.LayoutParams(zan.ro(this, 90.0f), zan.ro(this, 36.0f));
        layoutParams8.addRule(11);
        layoutParams8.addRule(15);
        layoutParams8.rightMargin = zan.ro(this, 5.0f);
        wsyVar.addView(wuVar3, layoutParams8);
        com.bytedance.sdk.openadsdk.core.ajl.lb lbVar3 = new com.bytedance.sdk.openadsdk.core.ajl.lb(this);
        jnrVar.addView(lbVar3, new LinearLayout.LayoutParams(-1, -1));
        View wsyVar2 = new com.bytedance.sdk.component.ef.wsy(this, wsy.lb.LANDING_PAGE);
        wsyVar2.setId(com.bytedance.sdk.openadsdk.utils.qhl.f7557ib);
        FrameLayout.LayoutParams layoutParams9 = new FrameLayout.LayoutParams(-1, -1);
        layoutParams9.topMargin = zan.ro(this, 2.0f);
        lbVar3.addView(wsyVar2, layoutParams9);
        com.bytedance.sdk.openadsdk.core.ajl.wsy wsyVar3 = new com.bytedance.sdk.openadsdk.core.ajl.wsy(this);
        wsyVar3.setId(com.bytedance.sdk.openadsdk.utils.qhl.f7561ne);
        wsyVar3.setBackgroundColor(Color.parseColor("#F8F8F8"));
        lbVar3.addView(wsyVar3, new FrameLayout.LayoutParams(-1, -1));
        View duvVar = new duv(this);
        duvVar.setId(com.bytedance.sdk.openadsdk.utils.qhl.kwx);
        wsyVar3.addView(duvVar, new RelativeLayout.LayoutParams(-1, -1));
        com.bytedance.sdk.openadsdk.core.ajl.jnr jnrVar3 = new com.bytedance.sdk.openadsdk.core.ajl.jnr(this);
        jnrVar3.setId(com.bytedance.sdk.openadsdk.utils.qhl.xgn);
        jnrVar3.setOrientation(1);
        jnrVar3.setVisibility(8);
        RelativeLayout.LayoutParams layoutParams10 = new RelativeLayout.LayoutParams(-1, -2);
        layoutParams10.addRule(13);
        wsyVar3.addView(jnrVar3, layoutParams10);
        com.bytedance.sdk.openadsdk.core.widget.qhl qhlVar = new com.bytedance.sdk.openadsdk.core.widget.qhl(this);
        qhlVar.setId(com.bytedance.sdk.openadsdk.utils.qhl.bkb);
        LinearLayout.LayoutParams layoutParams11 = new LinearLayout.LayoutParams(zan.ro(this, 80.0f), zan.ro(this, 80.0f));
        layoutParams11.gravity = 17;
        jnrVar3.addView(qhlVar, layoutParams11);
        com.bytedance.sdk.openadsdk.core.ajl.wu wuVar4 = new com.bytedance.sdk.openadsdk.core.ajl.wu(this);
        wuVar4.setId(com.bytedance.sdk.openadsdk.utils.qhl.lmk);
        wuVar4.setTextColor(Color.parseColor("#161823"));
        wuVar4.setTextSize(0, zan.ro(this, 24.0f));
        LinearLayout.LayoutParams layoutParams12 = new LinearLayout.LayoutParams(-2, -2);
        layoutParams12.gravity = 17;
        layoutParams12.topMargin = zan.ro(this, 12.0f);
        jnrVar3.addView(wuVar4, layoutParams12);
        com.bytedance.sdk.openadsdk.core.ajl.wu wuVar5 = new com.bytedance.sdk.openadsdk.core.ajl.wu(this);
        wuVar5.setId(com.bytedance.sdk.openadsdk.utils.qhl.mpp);
        wuVar5.setTextColor(Color.parseColor("#80161823"));
        wuVar5.setTextSize(0, zan.ro(this, 16.0f));
        wuVar5.setTextAlignment(4);
        LinearLayout.LayoutParams layoutParams13 = new LinearLayout.LayoutParams(-2, -2);
        layoutParams13.gravity = 17;
        int iRo2 = zan.ro(this, 60.0f);
        layoutParams13.rightMargin = iRo2;
        layoutParams13.leftMargin = iRo2;
        layoutParams13.topMargin = zan.ro(this, 8.0f);
        jnrVar3.addView(wuVar5, layoutParams13);
        com.bytedance.sdk.openadsdk.core.ajl.wu wuVar6 = new com.bytedance.sdk.openadsdk.core.ajl.wu(this);
        wuVar6.setId(com.bytedance.sdk.openadsdk.utils.qhl.vvj);
        wuVar6.setGravity(17);
        wuVar6.setTextColor(-1);
        wuVar6.setText(maa.fm(this, "tt_video_mobile_go_detail"));
        wuVar6.setBackground(ku.fm(this, "tt_reward_video_download_btn_bg"));
        LinearLayout.LayoutParams layoutParams14 = new LinearLayout.LayoutParams(zan.ro(this, 255.0f), zan.ro(this, 44.0f));
        layoutParams14.gravity = 17;
        layoutParams14.topMargin = zan.ro(this, 32.0f);
        jnrVar3.addView(wuVar6, layoutParams14);
        PAGLogoView pAGLogoView = new PAGLogoView(this);
        this.rka = pAGLogoView;
        pAGLogoView.setId(com.bytedance.sdk.openadsdk.utils.qhl.mj);
        this.rka.setVisibility(8);
        RelativeLayout.LayoutParams layoutParams15 = new RelativeLayout.LayoutParams(-2, zan.ro(this, 14.0f));
        layoutParams15.addRule(12);
        layoutParams15.leftMargin = zan.ro(this, 18.0f);
        layoutParams15.bottomMargin = zan.ro(this, 61.0f);
        wsyVar3.addView(this.rka, layoutParams15);
        View fhxVar2 = new com.bytedance.sdk.openadsdk.common.fhx(this, new fhx.fm() { // from class: com.bytedance.sdk.openadsdk.activity.single.TTVideoLandingPageLink2Activity.8
            @Override // com.bytedance.sdk.openadsdk.common.fhx.fm
            public View fm(Context context) {
                return new com.bytedance.sdk.openadsdk.common.wu(context);
            }
        });
        fhxVar2.setId(com.bytedance.sdk.openadsdk.utils.qhl.ado);
        FrameLayout.LayoutParams layoutParams16 = new FrameLayout.LayoutParams(-1, zan.ro(this, 48.0f));
        layoutParams16.gravity = 81;
        lbVar3.addView(fhxVar2, layoutParams16);
        return jnrVar;
    }
}
