Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix( version 1.10) #35

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .idea/gradle.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/misc.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

42 changes: 34 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,56 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
compileSdkVersion 32
defaultConfig {
applicationId "com.lonelypluto.pdfviewerdemo"
minSdkVersion 17
targetSdkVersion 28
targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

ndk.abiFilters 'armeabi-v7a', 'x86'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
// sourceSets {
// main {
// manifest.srcFile 'src/main/AndroidManifest.xml'
// java.srcDirs 'jniLibs', 'src'
// res.srcDirs 'res'
// }
// }
// externalNativeBuild {
// cmake {
// version '3.18.1'
// }
// ndkBuild.path 'jni/Android.mk'
// }
// ndkVersion '25.0.8355429'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'androidx.core:core:1.7.0'
implementation("androidx.appcompat:appcompat:1.4.1")
implementation 'androidx.customview:customview:1.1.0'
implementation 'com.google.android.material:material:1.6.0'
// implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation("com.github.librepdf:openpdf:1.3.23")
implementation("ro.andob.androidawt:androidawt:1.0.4")
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation 'com.lonelypluto:pdf-viewer:1.0.7'
// implementation 'com.lonelypluto:pdf-viewer:1.0.7'
}

This file was deleted.

5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down Expand Up @@ -43,4 +44,4 @@
android:screenOrientation="portrait" />
</application>

</manifest>
</manifest>
47 changes: 47 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/Annotation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

import android.graphics.RectF;

public class Annotation extends RectF
{
public final Type type;

public Annotation(final float x0, final float y0, final float x1, final float y1, final int _type) {
super(x0, y0, x1, y1);
this.type = ((_type == -1) ? Type.UNKNOWN : Type.values()[_type]);
}

public enum Type
{
TEXT,
LINK,
FREETEXT,
LINE,
SQUARE,
CIRCLE,
POLYGON,
POLYLINE,
HIGHLIGHT,
UNDERLINE,
SQUIGGLY,
STRIKEOUT,
STAMP,
CARET,
INK,
POPUP,
FILEATTACHMENT,
SOUND,
MOVIE,
WIDGET,
SCREEN,
PRINTERMARK,
TRAPNET,
WATERMARK,
A3D,
UNKNOWN;
}
}
58 changes: 58 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/CancellableAsyncTask.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import android.os.AsyncTask;

public class CancellableAsyncTask<Params, Result>
{
private final AsyncTask<Params, Void, Result> asyncTask;
private final CancellableTaskDefinition<Params, Result> ourTask;

public void onPreExecute() {
}

public void onPostExecute(final Result result) {
}

public CancellableAsyncTask(final CancellableTaskDefinition<Params, Result> task) {
if (task == null) {
throw new IllegalArgumentException();
}
this.ourTask = task;
this.asyncTask = new AsyncTask<Params, Void, Result>() {
protected Result doInBackground(final Params... params) {
return task.doInBackground(params);
}

protected void onPreExecute() {
CancellableAsyncTask.this.onPreExecute();
}

protected void onPostExecute(final Result result) {
CancellableAsyncTask.this.onPostExecute(result);
task.doCleanup();
}
};
}

public void cancelAndWait() {
this.asyncTask.cancel(true);
this.ourTask.doCancel();
try {
this.asyncTask.get();
}
catch (InterruptedException ex) {}
catch (ExecutionException ex2) {}
catch (CancellationException ex3) {}
this.ourTask.doCleanup();
}

public void execute(final Params... params) {
this.asyncTask.execute(params);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

public interface CancellableTaskDefinition<Params, Result>
{
Result doInBackground(final Params... p0);

void doCancel();

void doCleanup();
}
27 changes: 27 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/FilePicker.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

import android.net.Uri;

public abstract class FilePicker
{
private final FilePickerSupport support;

FilePicker(final FilePickerSupport _support) {
this.support = _support;
}

void pick() {
this.support.performPickFor(this);
}

abstract void onPick(final Uri p0);

public interface FilePickerSupport
{
void performPickFor(final FilePicker p0);
}
}
12 changes: 12 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/Hit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

public enum Hit
{
Nothing,
Widget,
Annotation;
}
19 changes: 19 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/LinkInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

import android.graphics.RectF;

public class LinkInfo
{
public final RectF rect;

public LinkInfo(final float l, final float t, final float r, final float b) {
this.rect = new RectF(l, t, r, b);
}

public void acceptVisitor(final LinkInfoVisitor visitor) {
}
}
20 changes: 20 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/LinkInfoExternal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

public class LinkInfoExternal extends LinkInfo
{
public final String url;

public LinkInfoExternal(final float l, final float t, final float r, final float b, final String u) {
super(l, t, r, b);
this.url = u;
}

@Override
public void acceptVisitor(final LinkInfoVisitor visitor) {
visitor.visitExternal(this);
}
}
20 changes: 20 additions & 0 deletions app/src/main/java/com/artifex/mupdfdemo/LinkInfoInternal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Decompiled by Procyon v0.5.36
//

package com.artifex.mupdfdemo;

public class LinkInfoInternal extends LinkInfo
{
public final int pageNumber;

public LinkInfoInternal(final float l, final float t, final float r, final float b, final int p) {
super(l, t, r, b);
this.pageNumber = p;
}

@Override
public void acceptVisitor(final LinkInfoVisitor visitor) {
visitor.visitInternal(this);
}
}
Loading