APKPure.apk(点击下载) / l.java


package e.g.a.i.c0;

import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.apkpure.aegon.R;
import com.apkpure.aegon.application.AegonApplication;
import com.apkpure.aegon.application.RealApplicationLike;
import com.apkpure.aegon.bean.PictureBean;
import com.apkpure.aegon.cms.activity.PictureBrowseActivity;
import com.apkpure.aegon.widgets.layout.FingerFrameLayout;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView;
import e.f.a.e.c;
import e.g.a.i0.a0;
import e.g.a.n0.b;
import e.g.a.s.l.a;
import e.g.a.t.b.i;
import e.h.a.q.g;
import e.s.a.c.a.q;
import e.s.a.c.b.j;

public class l extends i {

    /* renamed from: g  reason: collision with root package name */
    public YouTubePlayerView f6193g;

    /* renamed from: h  reason: collision with root package name */
    public ImageView f6194h;

    /* renamed from: i  reason: collision with root package name */
    public TextView f6195i;

    /* renamed from: j  reason: collision with root package name */
    public ImageView f6196j;

    /* renamed from: k  reason: collision with root package name */
    public PictureBean f6197k;

    /* renamed from: l  reason: collision with root package name */
    public b f6198l;

    /* renamed from: m  reason: collision with root package name */
    public FrameLayout f6199m;

    /* renamed from: n  reason: collision with root package name */
    public FingerFrameLayout f6200n;

    /* renamed from: o  reason: collision with root package name */
    public PictureBrowseActivity.d f6201o;

    /* renamed from: p  reason: collision with root package name */
    public FingerFrameLayout.a f6202p;

    /* renamed from: q  reason: collision with root package name */
    public boolean f6203q;

    /* renamed from: r  reason: collision with root package name */
    public boolean f6204r;

    /* renamed from: s  reason: collision with root package name */
    public q f6205s;

    /* renamed from: t  reason: collision with root package name */
    public boolean f6206t;

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View inflate = layoutInflater.inflate(R.layout.arg_RES_2131493197, viewGroup, false);
        if (getArguments() != null) {
            this.f6197k = (PictureBean) getArguments().getParcelable("bundle_video_data");
        }
        PictureBean pictureBean = this.f6197k;
        if (pictureBean != null) {
            this.f6203q = pictureBean.isAutoPlayVideo;
            this.f6204r = pictureBean.isFullScreen;
        }
        this.f6200n = (FingerFrameLayout) inflate.findViewById(R.id.arg_RES_2131298322);
        this.f6199m = (FrameLayout) inflate.findViewById(R.id.arg_RES_2131296660);
        this.f6196j = (ImageView) inflate.findViewById(R.id.arg_RES_2131296661);
        this.f6194h = (ImageView) inflate.findViewById(R.id.arg_RES_2131298914);
        this.f6195i = (TextView) inflate.findViewById(R.id.arg_RES_2131298912);
        if (this.f6193g == null) {
            this.f6193g = new YouTubePlayerView(this.c);
            FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);
            layoutParams.gravity = 17;
            this.f6193g.setLayoutParams(layoutParams);
            this.f6193g.setBackgroundResource(R.color.arg_RES_2131099826);
            this.f6193g.setVisibility(4);
            this.f6200n.addView(this.f6193g);
        }
        this.f6196j.getLayoutParams().height = c.G(this.c);
        this.f6193g.getLayoutParams().height = c.G(this.c);
        this.f6193g.setVisibility(8);
        int i2 = AegonApplication.f1165e;
        c.Y(RealApplicationLike.getContext(), "https://static-sg.winudf.com/wupload/xy/aprojectadmin/r4qBCniy.webp", this.f6194h, new g());
        a.c1(this.f6200n, 2151);
        if (this.f6201o != null) {
            this.f6200n.setOnClickListener(new e(this));
        }
        this.f6200n.setUpdateAlpha(false);
        FingerFrameLayout.a aVar = this.f6202p;
        if (aVar != null) {
            this.f6200n.setOnAlphaChangeListener(aVar);
        }
        if (!TextUtils.isEmpty(this.f6197k.lengthSeconds)) {
            this.f6195i.setText(a0.g(Integer.parseInt(this.f6197k.lengthSeconds)));
            this.f6195i.setVisibility(0);
        } else {
            this.f6195i.setVisibility(8);
        }
        if (!TextUtils.isEmpty(this.f6197k.thumbnailUrl)) {
            Context context = this.c;
            e.d.a.a.a.u0(context, 2, context, this.f6197k.thumbnailUrl, this.f6196j);
        }
        this.f6198l = new b(this.d, this.f6199m);
        this.f6196j.setOnClickListener(new d(this));
        this.f6196j.performClick();
        if (this.f6204r) {
            new Handler(Looper.getMainLooper()).post(new f(this));
        }
        j playerUiController = this.f6193g.getPlayerUiController();
        if (playerUiController != null) {
            View c = playerUiController.c();
            this.f6193g.setDtListener(new k(this));
            PictureBean pictureBean2 = this.f6197k;
            o.s.c.j.e(pictureBean2, "pictureBean");
            new Handler(Looper.getMainLooper()).post(new e.g.a.h0.b.q.b(c, pictureBean2));
        }
        e.w.c.e.b.l.b1(this, inflate);
        return inflate;
    }

    @Override // e.w.e.a.b.t.c.c, androidx.fragment.app.Fragment, e.g.a.t.b.i
    public void onDestroyView() {
        YouTubePlayerView youTubePlayerView = this.f6193g;
        if (youTubePlayerView != null) {
            if (this.f6206t) {
                PictureBean pictureBean = this.f6197k;
                e.g.a.h0.b.q.c.b(youTubePlayerView, "auto_pause", pictureBean.videoId, pictureBean.videoLength, Boolean.valueOf(pictureBean.isInterveneConfig));
            }
            this.f6193g.release();
        }
        super.onDestroyView();
    }

    @Override // e.w.e.a.b.t.c.c, androidx.fragment.app.Fragment, e.g.a.t.b.i
    public void setUserVisibleHint(boolean z) {
        super.setUserVisibleHint(z);
        if (!z && this.f6205s != null) {
            if (this.f6206t) {
                YouTubePlayerView youTubePlayerView = this.f6193g;
                PictureBean pictureBean = this.f6197k;
                e.g.a.h0.b.q.c.b(youTubePlayerView, "auto_pause", pictureBean.videoId, pictureBean.videoLength, Boolean.valueOf(pictureBean.isInterveneConfig));
            }
            this.f6205s.b();
        }
    }

    @Override // e.g.a.t.b.i, e.g.a.t.b.h
    public long v1() {
        return 2151;
    }
}