File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
src/main/java/com/github/barteksc/pdfviewer Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ plugins {
3
3
id ' maven-publish'
4
4
}
5
5
6
- group " com.github.lion1988dev "
6
+ group " com.github.GoIntegro "
7
7
8
8
android {
9
9
namespace " com.github.barteksc.pdfviewer"
@@ -42,15 +42,15 @@ android {
42
42
43
43
dependencies {
44
44
implementation ' androidx.appcompat:appcompat:1.6.1'
45
- api ' com.github.lion1988dev :PdfiumAndroid:1.9.4 '
45
+ api ' com.github.GoIntegro :PdfiumAndroid:1.9.5 '
46
46
}
47
47
48
48
publishing {
49
49
publications {
50
50
release(MavenPublication ) {
51
- groupId = ' com.github.lion1988dev '
51
+ groupId = ' com.github.GoIntegro '
52
52
artifactId = ' AndroidPdfViewer'
53
- version = " 3.2.4 "
53
+ version = " 3.2.5 "
54
54
55
55
afterEvaluate {
56
56
from components. release
Original file line number Diff line number Diff line change @@ -245,8 +245,6 @@ ScrollHandle getScrollHandle() {
245
245
public PDFView (Context context , AttributeSet set ) {
246
246
super (context , set );
247
247
248
- renderingHandlerThread = new HandlerThread ("PDF renderer" );
249
-
250
248
if (isInEditMode ()) {
251
249
return ;
252
250
}
@@ -462,6 +460,14 @@ public void computeScroll() {
462
460
animationManager .computeFling ();
463
461
}
464
462
463
+ @ Override
464
+ protected void onAttachedToWindow () {
465
+ super .onAttachedToWindow ();
466
+ if (renderingHandlerThread == null ) {
467
+ renderingHandlerThread = new HandlerThread ("PDF renderer" );
468
+ }
469
+ }
470
+
465
471
@ Override
466
472
protected void onDetachedFromWindow () {
467
473
recycle ();
@@ -753,6 +759,10 @@ void loadComplete(PdfFile pdfFile) {
753
759
754
760
this .pdfFile = pdfFile ;
755
761
762
+ if (renderingHandlerThread == null ) {
763
+ renderingHandlerThread = new HandlerThread ("PDF renderer" );
764
+ }
765
+
756
766
if (!renderingHandlerThread .isAlive ()) {
757
767
renderingHandlerThread .start ();
758
768
}
You can’t perform that action at this time.
0 commit comments