导航菜单

页面标题

页面副标题

MX Player v1.97.8 - FolderActivity.java 源代码

正在查看: MX Player v1.97.8 应用的 FolderActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mxtech.videoplayer.mxtransfer.ui.folder;

import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import defpackage.tg6;
import defpackage.ug6;
import defpackage.wk4;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class FolderActivity extends rya implements View.OnClickListener {
    public static final int x = 0;
    public String p;
    public String q;
    public RecyclerView r;
    public mxb s;
    public TextView t;
    public TextView u;
    public ImageView v;
    public final ug6 w = new ug6(this);

    public final void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        c7g.a(this);
    }

    public final void b6(String str) {
        this.q = str;
        if (TextUtils.equals(str, this.p)) {
            this.v.setVisibility(8);
        } else {
            this.v.setVisibility(0);
        }
        List arrayList = new ArrayList();
        File file = new File(str);
        this.u.setText(file.getName());
        this.t.setText(this.q);
        File[] listFiles = file.listFiles();
        if (listFiles != null && listFiles.length > 0) {
            arrayList = Arrays.asList(listFiles);
        }
        Collections.sort(arrayList, new tg6());
        mxb mxbVar = this.s;
        mxbVar.i = arrayList;
        mxbVar.notifyDataSetChanged();
    }

    public final void onBackPressed() {
        if (TextUtils.equals(this.q, this.p)) {
            super/*ub3*/.onBackPressed();
            return;
        }
        File parentFile = new File(this.q).getParentFile();
        if (parentFile == null) {
            z6h.e(getString(2114715745), false);
        } else {
            b6(parentFile.getPath());
        }
    }

    @Override
    public void onClick(View view) {
        if (view.getId() == 2114322442) {
            finish();
        }
        if (view.getId() != 2114322682 || TextUtils.equals(this.q, this.p)) {
            return;
        }
        File parentFile = new File(this.q).getParentFile();
        if (parentFile == null) {
            z6h.e(getString(2114715745), false);
        } else {
            b6(parentFile.getPath());
        }
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2114453507);
        int n = tya.m.n();
        if (n != 0) {
            setTheme(n);
        }
        findViewById(2114322442).setOnClickListener(this);
        ImageView imageView = (ImageView) findViewById(2114322682);
        this.v = imageView;
        imageView.setOnClickListener(this);
        TextView textView = (TextView) findViewById(2114322685);
        this.t = textView;
        textView.setMovementMethod(ScrollingMovementMethod.getInstance());
        this.u = (TextView) findViewById(2114322782);
        RecyclerView findViewById = findViewById(2114322554);
        this.r = findViewById;
        findViewById.setLayoutManager(new LinearLayoutManager(1));
        mxb mxbVar = new mxb();
        this.s = mxbVar;
        mxbVar.g(File.class, new b(this.w, this));
        this.r.setAdapter(this.s);
        String stringExtra = getIntent().getStringExtra("folder_path");
        this.p = stringExtra;
        this.q = stringExtra;
        if (TextUtils.isEmpty(stringExtra)) {
            finish();
        } else {
            b6(this.p);
        }
        tya.m.D(this);
    }

    public final void onResume() {
        super.onResume();
        wk4.b(this);
    }
}