正在查看: Uptodown App Store v6.80 应用的 Gallery.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 Gallery.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.activities;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.davemorrissey.labs.subscaleview.ImageSource;
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;
import com.squareup.picasso.s;
import com.uptodown.UptodownApp;
import com.uptodown.activities.Gallery;
import java.util.ArrayList;
import kotlin.jvm.internal.AbstractC1009g;
public final class Gallery extends AbstractC0740a {
public static final a M = new a(null);
private ArrayList K;
private final R2.g J = R2.h.a(new d3.a() {
@Override
public final Object invoke() {
c2.F g32;
g32 = Gallery.g3(Gallery.this);
return g32;
}
});
private final d L = new d();
public static final class a {
public a(AbstractC1009g abstractC1009g) {
this();
}
private a() {
}
}
final class b extends PagerAdapter {
public static final class a implements com.squareup.picasso.A {
final c2.G a;
a(c2.G g) {
this.a = g;
}
@Override
public void a(Exception e, Drawable drawable) {
kotlin.jvm.internal.m.e(e, "e");
this.a.c.setVisibility(8);
}
@Override
public void b(Drawable drawable) {
}
@Override
public void c(Bitmap bitmap, s.e from) {
kotlin.jvm.internal.m.e(bitmap, "bitmap");
kotlin.jvm.internal.m.e(from, "from");
this.a.b.setImage(ImageSource.bitmap(bitmap));
this.a.c.setVisibility(8);
}
}
public b() {
}
public static final void b(Gallery gallery, View view) {
if (UptodownApp.F.a0()) {
if (gallery.h3().c.getVisibility() == 0) {
y2.n nVar = new y2.n(gallery);
RelativeLayout toolbarGallery = gallery.h3().c;
kotlin.jvm.internal.m.d(toolbarGallery, "toolbarGallery");
nVar.i(toolbarGallery, 2130772036);
return;
}
y2.n nVar2 = new y2.n(gallery);
RelativeLayout toolbarGallery2 = gallery.h3().c;
kotlin.jvm.internal.m.d(toolbarGallery2, "toolbarGallery");
nVar2.h(toolbarGallery2, 2130772031);
}
}
public void destroyItem(ViewGroup container, int i, Object item) {
kotlin.jvm.internal.m.e(container, "container");
kotlin.jvm.internal.m.e(item, "item");
container.removeView((RelativeLayout) item);
}
public int getCount() {
if (Gallery.this.K == null) {
return 0;
}
ArrayList arrayList = Gallery.this.K;
kotlin.jvm.internal.m.b(arrayList);
return arrayList.size();
}
public Object instantiateItem(ViewGroup container, int i) {
kotlin.jvm.internal.m.e(container, "container");
c2.G c = c2.G.c(LayoutInflater.from(container.getContext()), container, false);
kotlin.jvm.internal.m.d(c, "inflate(...)");
c.c.setVisibility(0);
a aVar = new a(c);
c.b.setTag(aVar);
com.squareup.picasso.s h = com.squareup.picasso.s.h();
ArrayList arrayList = Gallery.this.K;
kotlin.jvm.internal.m.b(arrayList);
h.l(((g2.M) arrayList.get(i)).e()).l(2131231321).k(aVar);
container.addView(c.getRoot());
SubsamplingScaleImageView subsamplingScaleImageView = c.b;
final Gallery gallery = Gallery.this;
subsamplingScaleImageView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
Gallery.b.b(Gallery.this, view);
}
});
RelativeLayout root = c.getRoot();
kotlin.jvm.internal.m.d(root, "getRoot(...)");
return root;
}
public boolean isViewFromObject(View view, Object object) {
kotlin.jvm.internal.m.e(view, "view");
kotlin.jvm.internal.m.e(object, "object");
return view == object;
}
}
public static final class c implements ViewPager.OnPageChangeListener {
c() {
}
public void onPageScrollStateChanged(int i) {
}
public void onPageScrolled(int i, float f, int i4) {
}
public void onPageSelected(int i) {
Gallery.this.k3(i);
}
}
public static final class d extends OnBackPressedCallback {
d() {
super(true);
}
public void handleOnBackPressed() {
Gallery.this.finish();
}
}
public static final c2.F g3(Gallery gallery) {
return c2.F.c(gallery.getLayoutInflater());
}
public final c2.F h3() {
return (c2.F) this.J.getValue();
}
private final void i3(int i) {
h3().e.setAdapter(new b());
if (i > 0) {
h3().e.setCurrentItem(i);
}
h3().e.addOnPageChangeListener(new c());
k3(i);
h3().d.setTypeface(N1.k.g.w());
h3().b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
Gallery.j3(Gallery.this, view);
}
});
}
public static final void j3(Gallery gallery, View view) {
gallery.L.handleOnBackPressed();
}
public final void k3(int i) {
TextView textView = h3().d;
Integer valueOf = Integer.valueOf(i + 1);
ArrayList arrayList = this.K;
textView.setText(getString(2131952044, valueOf, arrayList != null ? Integer.valueOf(arrayList.size()) : null));
}
@Override
protected void onCreate(Bundle bundle) {
int i;
Bundle bundleExtra;
super.onCreate(bundle);
setContentView(h3().getRoot());
Window window = getWindow();
kotlin.jvm.internal.m.d(window, "getWindow(...)");
P2(window);
getOnBackPressedDispatcher().addCallback(this, this.L);
Intent intent = getIntent();
if (intent != null && (bundleExtra = intent.getBundleExtra("bundle")) != null) {
if (bundleExtra.containsKey("images")) {
this.K = Build.VERSION.SDK_INT >= 33 ? bundleExtra.getParcelableArrayList("images", g2.M.class) : bundleExtra.getParcelableArrayList("images");
}
if (bundleExtra.containsKey("index")) {
i = bundleExtra.getInt("index");
i3(i);
}
}
i = 0;
i3(i);
}
}