diff --git a/android/build.gradle b/android/build.gradle index ab85c0b..d89d899 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + classpath 'com.android.tools.build:gradle:2.2.0-beta1' } } @@ -21,6 +21,9 @@ android { minSdkVersion 16 targetSdkVersion 23 } + lintOptions { + abortOnError false + } } repositories { @@ -29,5 +32,5 @@ repositories { dependencies { compile 'com.facebook.react:react-native:0.20.+' - compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar' + compile 'com.github.barteksc:android-pdf-viewer:2.0.2' } diff --git a/android/src/main/java/com/keyee/pdfview/PDFViewManager.java b/android/src/main/java/com/keyee/pdfview/PDFViewManager.java index 2f27a88..25af1f9 100644 --- a/android/src/main/java/com/keyee/pdfview/PDFViewManager.java +++ b/android/src/main/java/com/keyee/pdfview/PDFViewManager.java @@ -6,9 +6,10 @@ import android.util.Log; import android.graphics.PointF; -import com.joanzapata.pdfview.PDFView; -import com.joanzapata.pdfview.listener.OnPageChangeListener; -import com.joanzapata.pdfview.listener.OnLoadCompleteListener; +import com.github.barteksc.pdfviewer.PDFView; +import com.github.barteksc.pdfviewer.listener.OnPageChangeListener; +import com.github.barteksc.pdfviewer.listener.OnLoadCompleteListener; + import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactApplicationContext; @@ -70,7 +71,6 @@ private void display(PDFView pdfView, boolean jumpToFirstPage) { if (assetName != null) { pdfView.fromAsset(assetName) .defaultPage(pageNumber) - .swipeVertical(true) .onPageChange(this) .onLoad(this) .load(); @@ -82,7 +82,6 @@ private void display(PDFView pdfView, boolean jumpToFirstPage) { .defaultPage(pageNumber) //.showMinimap(false) //.enableSwipe(true) - .swipeVertical(true) .onPageChange(this) .onLoad(this) .load();