diff --git a/android-pdf-viewer/build.gradle b/android-pdf-viewer/build.gradle index 32d03665..ac243d34 100644 --- a/android-pdf-viewer/build.gradle +++ b/android-pdf-viewer/build.gradle @@ -37,8 +37,9 @@ android { } dependencies { - implementation 'com.android.support:support-compat:28.0.0' - api 'com.github.barteksc:pdfium-android:1.9.0' + api fileTree(include: ['*.aar'], dir: 'libs') + + implementation 'androidx.core:core:1.3.1' } apply from: 'bintray.gradle' \ No newline at end of file diff --git a/android-pdf-viewer/libs/pdfium-android-fixed.aar b/android-pdf-viewer/libs/pdfium-android-fixed.aar new file mode 100644 index 00000000..0e1fb40d Binary files /dev/null and b/android-pdf-viewer/libs/pdfium-android-fixed.aar differ diff --git a/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/CacheManager.java b/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/CacheManager.java index 082ca3bf..92d20386 100644 --- a/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/CacheManager.java +++ b/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/CacheManager.java @@ -16,8 +16,8 @@ package com.github.barteksc.pdfviewer; import android.graphics.RectF; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.github.barteksc.pdfviewer.model.PagePart; import java.util.ArrayList; diff --git a/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/scroll/DefaultScrollHandle.java b/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/scroll/DefaultScrollHandle.java index 8195a540..f8f57bbe 100644 --- a/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/scroll/DefaultScrollHandle.java +++ b/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/scroll/DefaultScrollHandle.java @@ -4,13 +4,13 @@ import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Handler; -import android.support.v4.content.ContextCompat; import android.util.TypedValue; import android.view.MotionEvent; import android.view.ViewGroup; import android.widget.RelativeLayout; import android.widget.TextView; +import androidx.core.content.ContextCompat; import com.github.barteksc.pdfviewer.PDFView; import com.github.barteksc.pdfviewer.R; import com.github.barteksc.pdfviewer.util.Util; diff --git a/sample/build.gradle b/sample/build.gradle index 133bcdde..9b851be7 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -26,7 +26,7 @@ android { dependencies { implementation project(':android-pdf-viewer') - implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'org.androidannotations:androidannotations-api:4.6.0' annotationProcessor "org.androidannotations:androidannotations:4.6.0" } diff --git a/sample/src/main/java/com/github/barteksc/sample/PDFViewActivity.java b/sample/src/main/java/com/github/barteksc/sample/PDFViewActivity.java index d23b0008..da90b296 100755 --- a/sample/src/main/java/com/github/barteksc/sample/PDFViewActivity.java +++ b/sample/src/main/java/com/github/barteksc/sample/PDFViewActivity.java @@ -22,20 +22,20 @@ import android.graphics.Color; import android.net.Uri; import android.provider.OpenableColumns; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import com.github.barteksc.pdfviewer.PDFView; import com.github.barteksc.pdfviewer.listener.OnLoadCompleteListener; import com.github.barteksc.pdfviewer.listener.OnPageChangeListener; import com.github.barteksc.pdfviewer.listener.OnPageErrorListener; import com.github.barteksc.pdfviewer.scroll.DefaultScrollHandle; import com.github.barteksc.pdfviewer.util.FitPolicy; -import com.shockwave.pdfium.PdfDocument; +import com.shockwave.pdfium.*; import org.androidannotations.annotations.AfterViews; import org.androidannotations.annotations.EActivity;