导航菜单

页面标题

页面副标题

24Six v66.1.24 - ActivitySlideshow.java 源代码

正在查看: 24Six v66.1.24 应用的 ActivitySlideshow.java JAVA 源代码文件

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


package app.tfs.activity;

import L0.h;
import L0.i;
import M0.q;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.annotation.Keep;
import app.tfs.R;
import app.tfs.activity.ActivitySlideshow;
import app.tfs.model.TfsPhoto;
import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestBuilder;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.rustybrick.gesture.GestureImageView;
import j.C0536c;
import j.o0;
import java.util.List;
import kotlin.jvm.internal.D;
import kotlin.jvm.internal.g;
import kotlin.jvm.internal.m;

public final class ActivitySlideshow extends app.tfs.activity.c implements a0.c {

    public static final a f398t = new a(null);

    private C0536c f399r;

    private final h f400s = i.a(new c("JSON_ARGUMENTS", this, s.a.b(), null));

    @Keep
    public static final class MyArgs {

        @SerializedName("images")
        private final List<TfsPhoto> images;

        public MyArgs(List<TfsPhoto> list) {
            m.e(list, "images");
            this.images = list;
        }

        public static MyArgs copy$default(MyArgs myArgs, List list, int i2, Object obj) {
            if ((i2 & 1) != 0) {
                list = myArgs.images;
            }
            return myArgs.copy(list);
        }

        public final List<TfsPhoto> component1() {
            return this.images;
        }

        public final MyArgs copy(List<TfsPhoto> list) {
            m.e(list, "images");
            return new MyArgs(list);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            return (obj instanceof MyArgs) && m.a(this.images, ((MyArgs) obj).images);
        }

        public final List<TfsPhoto> getImages() {
            return this.images;
        }

        public int hashCode() {
            return this.images.hashCode();
        }

        public String toString() {
            return "MyArgs(images=" + this.images + ")";
        }
    }

    public static final class a {
        public a(g gVar) {
            this();
        }

        private a() {
        }
    }

    public static final class b extends c0.e {

        public static final class a implements RequestListener {
            final o0 c;

            a(o0 o0Var) {
                this.c = o0Var;
            }

            @Override
            public boolean onResourceReady(Bitmap bitmap, Object obj, Target target, DataSource dataSource, boolean z2) {
                m.e(bitmap, "resource");
                m.e(obj, "model");
                m.e(dataSource, "dataSource");
                this.c.c.hide();
                return false;
            }

            @Override
            public boolean onLoadFailed(GlideException glideException, Object obj, Target target, boolean z2) {
                m.e(target, "target");
                this.c.c.hide();
                return false;
            }
        }

        public static final class C0006b implements U.i {
            private boolean a;
            final o0 b;
            final ActivitySlideshow c;

            C0006b(o0 o0Var, ActivitySlideshow activitySlideshow) {
                this.b = o0Var;
                this.c = activitySlideshow;
            }

            public void a(float f2, float f3) {
                g(false);
            }

            public void b(float f2, float f3) {
                U.h.d(this, f2, f3);
            }

            public void c(float f2, float f3) {
                g(this.b.b.getGestureableViewTouchListener().q());
            }

            public void d(float f2) {
                U.h.e(this, f2);
            }

            public boolean e(boolean z2, boolean z3, float f2, float f3) {
                if (!this.a) {
                    return false;
                }
                if (this.b.b.getGestureableViewTouchListener().k() && f2 > 0.0f) {
                    this.c.N(-1);
                    return true;
                }
                if (!this.b.b.getGestureableViewTouchListener().j() || f2 >= 0.0f) {
                    return false;
                }
                this.c.N(1);
                return true;
            }

            public boolean f(float f2, float f3, float f4, float f5, boolean z2) {
                return U.h.b(this, f2, f3, f4, f5, z2);
            }

            public final void g(boolean z2) {
                this.a = z2;
                this.b.b.getParent().requestDisallowInterceptTouchEvent(z2);
            }

            public boolean onDoubleTap(MotionEvent motionEvent) {
                return U.h.a(this, motionEvent);
            }

            public void onLongPress(MotionEvent motionEvent) {
                U.h.c(this, motionEvent);
            }

            public boolean onSingleTapConfirmed(MotionEvent motionEvent) {
                return U.h.f(this, motionEvent);
            }
        }

        b() {
        }

        public View a(int i2, ViewGroup viewGroup) {
            m.e(viewGroup, "container");
            o0 c = o0.c(LayoutInflater.from(viewGroup.getContext()), viewGroup, false);
            ActivitySlideshow activitySlideshow = ActivitySlideshow.this;
            c.c.show();
            TfsPhoto tfsPhoto = (TfsPhoto) q.L(activitySlideshow.O().getImages(), i2);
            String large = tfsPhoto != null ? tfsPhoto.getLarge() : null;
            if (large == null) {
                c.c.hide();
                c.b.setImageDrawable((Drawable) null);
            } else {
                RequestBuilder<Bitmap> asBitmap = Glide.with((View) c.b).asBitmap();
                m.d(asBitmap, "asBitmap(...)");
                RequestBuilder<Bitmap> load = asBitmap.listener(new a(c)).load(large);
                GestureImageView gestureImageView = c.b;
                m.d(gestureImageView, "imageView");
                m.b(load.into((RequestBuilder<Bitmap>) new o.a(gestureImageView, Integer.MIN_VALUE, Integer.MIN_VALUE)));
            }
            c.b.setGesturableListener(new C0006b(c, activitySlideshow));
            c.getRoot().setRotation(c.getRoot().getResources().getInteger(R.f.pagerRotation));
            FrameLayout root = c.getRoot();
            m.d(root, "getRoot(...)");
            return root;
        }

        public int getCount() {
            return ActivitySlideshow.this.O().getImages().size();
        }
    }

    public static final class c implements Y0.a {
        final String c;
        final a0.c d;

        final Gson f401f;

        final Y0.a f402g;

        public c(String str, a0.c cVar, Gson gson, Y0.a aVar) {
            this.c = str;
            this.d = cVar;
            this.f401f = gson;
            this.f402g = aVar;
        }

        public final Object invoke() {
            String str = this.c;
            Intent intent = this.d.getIntent();
            return a0.e.a(str, intent != null ? intent.getExtras() : null, D.b(MyArgs.class), this.f401f, this.f402g);
        }
    }

    public final void N(int i2) {
        C0536c c0536c = this.f399r;
        C0536c c0536c2 = null;
        if (c0536c == null) {
            m.w("viewBinding");
            c0536c = null;
        }
        int currentItem = c0536c.c.getCurrentItem() + i2;
        if (currentItem < 0 || currentItem >= O().getImages().size()) {
            return;
        }
        C0536c c0536c3 = this.f399r;
        if (c0536c3 == null) {
            m.w("viewBinding");
        } else {
            c0536c2 = c0536c3;
        }
        c0536c2.c.setCurrentItem(currentItem, true);
    }

    public final MyArgs O() {
        return (MyArgs) this.f400s.getValue();
    }

    public static final void P(ActivitySlideshow activitySlideshow, View view) {
        activitySlideshow.finish();
    }

    public String m() {
        return "ActivitySlideshow";
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        C0536c c2 = C0536c.c(getLayoutInflater());
        this.f399r = c2;
        C0536c c0536c = null;
        if (c2 == null) {
            m.w("viewBinding");
            c2 = null;
        }
        setContentView(c2.getRoot());
        C0536c c0536c2 = this.f399r;
        if (c0536c2 == null) {
            m.w("viewBinding");
            c0536c2 = null;
        }
        c0536c2.b.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActivitySlideshow.P(ActivitySlideshow.this, view);
            }
        });
        C0536c c0536c3 = this.f399r;
        if (c0536c3 == null) {
            m.w("viewBinding");
        } else {
            c0536c = c0536c3;
        }
        c0536c.c.setAdapter(new b());
    }
}