正在查看: OLX India v19.42.007 应用的 MediaGalleryActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 MediaGalleryActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package olx.com.customviews.galleryview.view;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.databinding.g;
import androidx.fragment.app.Fragment;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import olx.com.customviews.galleryview.view.MediaGalleryPagerView;
import olx.com.delorean.domain.Constants;
@Metadata
public final class MediaGalleryActivity extends b implements View.OnClickListener, MediaGalleryPagerView.b {
public static final a Z = new a(null);
private int V;
public olx.com.customviews.galleryview.service.a X;
public olx.com.customviews.databinding.c Y;
private String U = "";
private List W = new ArrayList();
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final void a(Fragment fragment, ArrayList arrayList, int i, String str, int i2) {
Intent intent = new Intent((Context) fragment.getActivity(), (Class<?>) MediaGalleryActivity.class);
intent.putExtra("gallery_media_list", arrayList);
intent.putExtra("gallery_media_index", i);
intent.putExtra("source", str);
fragment.startActivityForResult(intent, i2);
}
private a() {
}
}
private final void n2(int i) {
olx.com.customviews.galleryview.service.a p2 = p2();
String str = this.U;
p2.a(str, olx.com.customviews.galleryview.tracking.a.CLOSE_BUTTON_TAP, MapsKt.m(new Pair[]{new Pair(Constants.ExtraKeys.SELECT_FROM, str), new Pair("images_count", Integer.valueOf(o2().B.getMediaListSize())), new Pair("page_number", Integer.valueOf(o2().B.getCurrentItem()))}));
Intent intent = new Intent();
intent.putExtra("gallery_media_index", o2().B.getCurrentItem());
setResult(i, intent);
finish();
}
private final void q2(List list) {
MediaGalleryPagerView mediaGalleryPagerView = o2().B;
mediaGalleryPagerView.setPinchPanZoomEnabled(true);
mediaGalleryPagerView.setIsGallery(true);
mediaGalleryPagerView.setImages(list);
mediaGalleryPagerView.setSelectedPhoto(this.V);
mediaGalleryPagerView.setOnMediaChangeListener(this);
}
@Override
public void b(int i) {
olx.com.customviews.galleryview.service.a p2 = p2();
String str = this.U;
p2.a(str, olx.com.customviews.galleryview.tracking.a.SWIPE_FULL_SCREEN, MapsKt.m(new Pair[]{new Pair(Constants.ExtraKeys.SELECT_FROM, str), new Pair("images_count", Integer.valueOf(o2().B.getMediaListSize())), new Pair("page_number", Integer.valueOf(i))}));
}
public final olx.com.customviews.databinding.c o2() {
olx.com.customviews.databinding.c cVar = this.Y;
if (cVar != null) {
return cVar;
}
return null;
}
public void onBackPressed() {
n2(0);
}
@Override
public void onClick(View view) {
if (Integer.valueOf(view.getId()).equals(Integer.valueOf(olx.com.customviews.c.crossButton))) {
n2(-1);
}
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
r2((olx.com.customviews.databinding.c) g.j(this, olx.com.customviews.d.media_gallery_activity));
if (getIntent() != null) {
Bundle extras = getIntent().getExtras();
this.W = (ArrayList) (extras != null ? extras.getSerializable("gallery_media_list") : null);
Bundle extras2 = getIntent().getExtras();
this.V = (extras2 != null ? Boolean.valueOf(extras2.containsKey("gallery_media_index")) : null).booleanValue() ? getIntent().getExtras().getInt("gallery_media_index") : 0;
Bundle extras3 = getIntent().getExtras();
this.U = extras3 != null ? extras3.getString("source") : null;
}
o2().A.setOnClickListener(this);
q2(this.W);
}
public final olx.com.customviews.galleryview.service.a p2() {
olx.com.customviews.galleryview.service.a aVar = this.X;
if (aVar != null) {
return aVar;
}
return null;
}
public final void r2(olx.com.customviews.databinding.c cVar) {
this.Y = cVar;
}
}