正在查看: SpinDisplay v2.0.2.6 应用的 PdfActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpinDisplay v2.0.2.6 应用的 PdfActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.dmz.f20ad.activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import b.b.k.l;
import b.u.y;
import com.dmz.f20ad.App;
import com.dmz.f20ad.pdf.PDFCatelogueActivity;
import com.github.barteksc.pdfviewer.PDFView;
import com.shockwave.pdfium.PdfDocument;
import d.f.a.a.k.d;
import d.f.a.a.k.f;
import d.f.a.a.k.g;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class PdfActivity extends l implements f, d, g {
public PDFView s;
public Button t;
public Button u;
public List<d.e.a.s.b.d> v;
public int w = 0;
public class a implements View.OnClickListener {
public a() {
}
@Override
public void onClick(View view) {
PdfActivity.this.finish();
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public void onClick(View view) {
Intent intent = new Intent(PdfActivity.this, (Class<?>) PDFCatelogueActivity.class);
intent.putExtra("catelogues", (Serializable) PdfActivity.this.v);
PdfActivity.this.startActivityForResult(intent, 200);
}
}
@Override
public void a(int i2, int i3) {
this.w = i2;
}
@Override
public void a(int i2, Throwable th) {
Log.e("wyt PdfActivity", th.getMessage());
}
public final void a(List<d.e.a.s.b.d> list, List<PdfDocument.Bookmark> list2, int i2) {
for (PdfDocument.Bookmark bookmark : list2) {
d.e.a.s.b.d dVar = new d.e.a.s.b.d();
dVar.f5328b = bookmark.c();
dVar.f5329c = (int) bookmark.b();
dVar.f5331e = i2;
dVar.f5330d = false;
list.add(dVar);
if (bookmark.a() != null && bookmark.a().size() > 0) {
ArrayList arrayList = new ArrayList();
dVar.f5332f = arrayList;
a(arrayList, bookmark.a(), i2 + 1);
}
}
}
@Override
public void c(int i2) {
Log.d("wyt PdfActivity", "loadComplete: " + i2);
List<PdfDocument.Bookmark> tableOfContents = this.s.getTableOfContents();
List<d.e.a.s.b.d> list = this.v;
if (list != null) {
list.clear();
} else {
this.v = new ArrayList();
}
a(this.v, tableOfContents, 1);
}
@Override
public void onActivityResult(int i2, int i3, Intent intent) {
int intExtra;
super.onActivityResult(i2, i3, intent);
if (i3 != -1 || (intExtra = intent.getIntExtra("pageNum", 0)) <= 0) {
return;
}
this.s.b(intExtra);
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
y.a(getWindow(), r());
setContentView(2131492907);
this.s = (PDFView) findViewById(2131296648);
this.t = (Button) findViewById(2131296364);
this.u = (Button) findViewById(2131296365);
this.t.setOnClickListener(new a());
this.u.setOnClickListener(new b());
}
@Override
public void onDestroy() {
super.onDestroy();
PDFView pDFView = this.s;
if (pDFView != null) {
pDFView.p();
}
}
@Override
public void onResume() {
PDFView.b a2;
d.f.a.a.m.a aVar;
super.onResume();
File file = new File(App.f2838g.e(), "help.pdf");
if (file.exists()) {
StringBuilder a3 = d.b.a.a.a.a("onResume: ");
a3.append(file.getAbsolutePath());
Log.d("wyt PdfActivity", a3.toString());
a2 = this.s.a(file);
a2.f3361i = this.w;
a2.f3358f = this;
a2.f3363k = true;
a2.f3357e = this;
aVar = new d.f.a.a.m.a(this);
} else {
a2 = this.s.a("help.pdf");
a2.f3361i = this.w;
a2.f3358f = this;
a2.f3363k = true;
a2.f3357e = this;
aVar = new d.f.a.a.m.a(this);
}
a2.f3365m = aVar;
a2.o = 10;
a2.f3359g = this;
a2.q = d.f.a.a.o.b.BOTH;
a2.a();
}
}