This repository was archived by the owner on Nov 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +14
-15
lines changed
src/main/java/com/github/barteksc/pdfviewer/scroll
sample/src/main/java/com/github/barteksc/sample Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 1+ ## 2.0.1 (2016-08-16)
2+ * Fix NPE when onDetachFromWindow is called
3+
14## 2.0.0 (2016-08-14)
25* few API changes
36* improved rendering speed and accuracy
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ Licensed under Apache License 2.0.
1313* added ` fling ` scroll gesture for velocity based scrolling
1414* added scroll handle as a replacement for scrollbar
1515
16+ 2.0.1 fixes NPE when onDetachFromWindow is called.
17+
1618## Changes in 2.0 API
1719* ` Configurator#defaultPage(int) ` and ` PDFView#jumpTo(int) ` now require page index (i.e. starting from 0)
1820* ` OnPageChangeListener#onPageChanged(int, int) ` is called with page index (i.e. starting from 0)
@@ -26,7 +28,7 @@ Licensed under Apache License 2.0.
2628
2729Add to _ build.gradle_ :
2830
29- ` compile 'com.github.barteksc:android-pdf-viewer:2.0.0 ' `
31+ ` compile 'com.github.barteksc:android-pdf-viewer:2.0.1 ' `
3032
3133Library is available in jcenter repository, probably it'll be in Maven Central soon.
3234
Original file line number Diff line number Diff line change 1313 siteUrl = ' https://github.com/barteksc/AndroidPdfViewer'
1414 gitUrl = ' https://github.com/barteksc/AndroidPdfViewer.git'
1515
16- libraryVersion = ' 2.0.0 '
16+ libraryVersion = ' 2.0.1 '
1717
1818 developerId = ' barteksc'
1919 developerName = ' Bartosz Schiller'
@@ -32,7 +32,7 @@ android {
3232 minSdkVersion 11
3333 targetSdkVersion 23
3434 versionCode 1
35- versionName " 2.0.0 "
35+ versionName " 2.0.1 "
3636 }
3737
3838}
Original file line number Diff line number Diff line change @@ -100,7 +100,12 @@ public void setupLayout(PDFView pdfView) {
100100
101101 @ Override
102102 public void destroyLayout () {
103- ((ViewGroup ) pdfView .getParent ()).removeView (this );
103+ post (new Runnable () {
104+ @ Override
105+ public void run () {
106+ ((ViewGroup ) pdfView .getParent ()).removeView (DefaultScrollHandle .this );
107+ }
108+ });
104109 }
105110
106111 @ Override
Original file line number Diff line number Diff line change @@ -68,17 +68,6 @@ void pickFile() {
6868
6969 @ AfterViews
7070 void afterViews () {
71- try {
72- Thread .setDefaultUncaughtExceptionHandler (new Thread .UncaughtExceptionHandler () {
73-
74- @ Override
75- public void uncaughtException (Thread t , Throwable e ) {
76- e .printStackTrace ();
77- }
78- });
79- } catch (SecurityException e ) {
80- e .printStackTrace ();
81- }
8271 if (uri != null ) {
8372 displayFromUri (uri );
8473 } else {
You can’t perform that action at this time.
0 commit comments