Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 46e2dde

Browse files
committed
Fix bug with rendering PDFView in Android Studio Layout Editor
1 parent af4ba89 commit 46e2dde

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.8.1 (2017-11-11)
2+
* Fix bug with rendering `PDFView` in Android Studio Layout Editor
3+
14
## 2.8.0 (2017-10-31)
25
* Add handling of invalid pages, inspired by pull request #433. Exception on page opening crashed application until now,
36
currently `OnPageErrorListener` set with `.onPageError()` is called. Invalid page color can be set using `.invalidPageColor()`

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ currently `OnPageErrorListener` set with `Configurator#onPageError()` is called.
1616
* Implement `canScrollVertically()` and `canScrollHorizontally()` methods to work e.g. with `SwipeRefreshLayout`
1717
* Fix bug when `Configurator#load()` method was called before view has been measured, which resulted in empty canvas
1818

19+
2.8.1 fixes bug with rendering `PDFView` in Android Studio Layout Editor
20+
1921
## Changes in 2.0 API
2022
* `Configurator#defaultPage(int)` and `PDFView#jumpTo(int)` now require page index (i.e. starting from 0)
2123
* `OnPageChangeListener#onPageChanged(int, int)` is called with page index (i.e. starting from 0)
@@ -29,7 +31,7 @@ currently `OnPageErrorListener` set with `Configurator#onPageError()` is called.
2931

3032
Add to _build.gradle_:
3133

32-
`compile 'com.github.barteksc:android-pdf-viewer:2.8.0'`
34+
`compile 'com.github.barteksc:android-pdf-viewer:2.8.1'`
3335

3436
Library is available in jcenter repository, probably it'll be in Maven Central soon.
3537

android-pdf-viewer/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
1414
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'
1515

16-
libraryVersion = '2.8.0'
16+
libraryVersion = '2.8.1'
1717

1818
developerId = 'barteksc'
1919
developerName = 'Bartosz Schiller'
@@ -32,7 +32,7 @@ android {
3232
minSdkVersion 11
3333
targetSdkVersion 25
3434
versionCode 1
35-
versionName "2.8.0"
35+
versionName "2.8.1"
3636
}
3737

3838
}

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/PDFView.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ public boolean isRecycled() {
598598
@Override
599599
public void computeScroll() {
600600
super.computeScroll();
601+
if (isInEditMode()) {
602+
return;
603+
}
601604
animationManager.computeFling();
602605
}
603606

0 commit comments

Comments
 (0)