导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - ScreenshotRecycleBinActivity.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 ScreenshotRecycleBinActivity.java JAVA 源代码文件

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


package com.fancyclean.boost.screenshotclean.ui.activity;

import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import c7.k;
import com.applovin.exoplayer2.ui.n;
import com.fancyclean.boost.common.ui.view.ImageCheckBox;
import com.fancyclean.boost.screenshotclean.ui.presenter.ScreenshotRecycleBinPresenter;
import com.thinkyeah.common.ui.dialog.c;
import com.thinkyeah.common.ui.view.PartialCheckBox;
import com.thinkyeah.common.ui.view.ThinkRecyclerView;
import com.thinkyeah.common.ui.view.TitleBar;
import gl.d;
import hb.c;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import k7.i;
import kotlin.jvm.internal.s;
import n.g;
import t4.f;
import vj.h;

@d(ScreenshotRecycleBinPresenter.class)
public class ScreenshotRecycleBinActivity extends v7.a<c> implements hb.d {
    public static final int r = 0;
    public View l;
    public View m;
    public View n;
    public View o;
    public final b p = new b();
    public boolean q = false;

    public static class a extends com.thinkyeah.common.ui.dialog.c<ScreenshotRecycleBinActivity> {
        public static final int c = 0;

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            c.a aVar = new c.a(getContext());
            aVar.g(2131886714);
            aVar.k = Html.fromHtml(getString(2131886660));
            aVar.d(2131886274, (DialogInterface.OnClickListener) null);
            aVar.e(2131886483, new f(this, 4));
            return aVar.a();
        }
    }

    public class b extends al.c<C0078b, c, eb.a> {

        public class a extends GridLayoutManager.SpanSizeLookup {
            public final RecyclerView.LayoutManager a;

            public a(RecyclerView.LayoutManager layoutManager) {
                this.a = layoutManager;
            }

            public final int getSpanSize(int i) {
                if (b.this.getItemViewType(i) == 2) {
                    return this.a.getSpanCount();
                }
                return 1;
            }
        }

        public class C0078b extends dl.c {
            public final TextView d;
            public final PartialCheckBox e;
            public final ImageView f;
            public final View g;

            public C0078b(ViewGroup viewGroup) {
                super(g.d(viewGroup, 2131558709, viewGroup, false));
                this.d = (TextView) ((RecyclerView.ViewHolder) this).itemView.findViewById(2131363599);
                this.e = ((RecyclerView.ViewHolder) this).itemView.findViewById(2131362909);
                this.f = (ImageView) ((RecyclerView.ViewHolder) this).itemView.findViewById(2131362400);
                this.g = ((RecyclerView.ViewHolder) this).itemView.findViewById(2131363783);
            }

            public final void c() {
                this.f.animate().rotation(360.0f);
            }

            public final void d() {
                this.f.animate().rotation(180.0f);
            }
        }

        public class c extends dl.b {
            public final ImageView c;
            public final ImageCheckBox d;

            public c(ViewGroup viewGroup) {
                super(g.d(viewGroup, 2131558656, viewGroup, false));
                this.c = (ImageView) ((RecyclerView.ViewHolder) this).itemView.findViewById(2131362489);
                this.d = (ImageCheckBox) ((RecyclerView.ViewHolder) this).itemView.findViewById(2131362048);
            }
        }

        public b() {
            super((List) null);
        }

        public final void h(dl.b bVar, int i, cl.b bVar2, int i10) {
            c cVar = (c) bVar;
            eb.a aVar = (eb.a) bVar2.b.get(i10);
            i b = k7.f.b(((RecyclerView.ViewHolder) cVar).itemView.getContext());
            Context context = ((RecyclerView.ViewHolder) cVar).itemView.getContext();
            String str = aVar.e;
            h hVar = k.a;
            k7.h<Drawable> v = b.v(new File(k.b(context), str));
            ImageView imageView = cVar.c;
            v.D(imageView);
            boolean k02 = ((hb.c) ScreenshotRecycleBinActivity.this.W2()).k0(aVar);
            AppCompatImageView appCompatImageView = cVar.d;
            appCompatImageView.setChecked(k02);
            appCompatImageView.setOnClickListener(new wa.d(1, cVar, aVar));
            imageView.setOnClickListener(new gb.c(0, cVar, aVar));
        }

        public final void i(dl.c cVar, int i, cl.b bVar) {
            C0078b c0078b = (C0078b) cVar;
            c0078b.getClass();
            c0078b.g.setVisibility(i == 0 ? 8 : 0);
            b bVar2 = b.this;
            c0078b.f.setRotation(bVar2.f(i) ? 180.0f : 360.0f);
            int i10 = ((eb.b) bVar).c;
            TextView textView = c0078b.d;
            textView.setTextColor(ContextCompat.getColor(textView.getContext(), i10 <= 3 ? 2131100613 : 2131100531));
            textView.setText(bVar.a);
            ArrayList arrayList = new ArrayList();
            List list = bVar.b;
            if (!s.q(list)) {
                for (Object obj : list) {
                    if (((hb.c) ScreenshotRecycleBinActivity.this.W2()).k0((eb.a) obj)) {
                        arrayList.add(obj);
                    }
                }
            }
            int size = arrayList.size();
            int size2 = list.size();
            PartialCheckBox partialCheckBox = c0078b.e;
            if (size == size2) {
                partialCheckBox.setCheckState(1);
            } else {
                partialCheckBox.setCheckState(arrayList.isEmpty() ? 2 : 3);
            }
            partialCheckBox.setOnClickListener(new l8.b(1, c0078b, bVar));
        }

        public final dl.b j(ViewGroup viewGroup, int i) {
            return new c(viewGroup);
        }

        public final dl.c k(ViewGroup viewGroup) {
            return new C0078b(viewGroup);
        }

        public final void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
            super/*androidx.recyclerview.widget.RecyclerView.Adapter*/.onAttachedToRecyclerView(recyclerView);
            GridLayoutManager layoutManager = recyclerView.getLayoutManager();
            if (layoutManager instanceof GridLayoutManager) {
                layoutManager.setSpanSizeLookup(new a(layoutManager));
            }
        }
    }

    public final void X2() {
        List<eb.a> c = ((hb.c) W2()).c();
        boolean z10 = false;
        if (!s.q(c)) {
            Iterator<eb.a> it = c.iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                if (((hb.c) W2()).k0(it.next())) {
                    z10 = true;
                    break;
                }
            }
        }
        this.o.setEnabled(z10);
        this.n.setEnabled(z10);
    }

    @Override
    public final void e() {
        runOnUiThread(new androidx.activity.d(this, 22));
    }

    public final void finish() {
        setResult(this.q ? 257 : 0);
        super/*android.app.Activity*/.finish();
    }

    public final void onBackPressed() {
        setResult(this.q ? 257 : 0);
        super/*androidx.activity.ComponentActivity*/.onBackPressed();
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558518);
        TitleBar.a configure = findViewById(2131363196).getConfigure();
        configure.e(2131887937);
        configure.g(new t4.a(this, 23));
        configure.a();
        this.l = findViewById(2131363804);
        this.m = findViewById(2131363777);
        this.n = findViewById(2131362023);
        View findViewById = findViewById(2131362002);
        this.o = findViewById;
        findViewById.setOnClickListener(new t4.d(this, 21));
        this.n.setOnClickListener(new com.facebook.login.d(this, 29));
        ThinkRecyclerView findViewById2 = findViewById(2131363021);
        findViewById2.setLayoutManager(new GridLayoutManager(this, 4));
        findViewById2.setItemAnimator((RecyclerView.ItemAnimator) null);
        findViewById2.setAdapter(this.p);
        ((hb.c) W2()).g1();
    }

    @Override
    public final void u1(List<eb.b> list) {
        runOnUiThread(new d.b(12, this, list));
    }

    @Override
    public final void u2() {
        this.q = true;
        runOnUiThread(new n(this, 17));
    }

    @Override
    public final void z1() {
        runOnUiThread(new androidx.core.widget.a(this, 29));
    }
}