File tree Expand file tree Collapse file tree
src/main/java/com/github/barteksc/pdfviewer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ plugins {
33 id ' maven-publish'
44}
55
6- group " com.github.lion1988dev "
6+ group " com.github.GoIntegro "
77
88android {
99 namespace " com.github.barteksc.pdfviewer"
@@ -42,15 +42,15 @@ android {
4242
4343dependencies {
4444 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 '
4646}
4747
4848publishing {
4949 publications {
5050 release(MavenPublication ) {
51- groupId = ' com.github.lion1988dev '
51+ groupId = ' com.github.GoIntegro '
5252 artifactId = ' AndroidPdfViewer'
53- version = " 3.2.4 "
53+ version = " 3.2.5 "
5454
5555 afterEvaluate {
5656 from components. release
Original file line number Diff line number Diff line change @@ -245,8 +245,6 @@ ScrollHandle getScrollHandle() {
245245 public PDFView (Context context , AttributeSet set ) {
246246 super (context , set );
247247
248- renderingHandlerThread = new HandlerThread ("PDF renderer" );
249-
250248 if (isInEditMode ()) {
251249 return ;
252250 }
@@ -462,6 +460,14 @@ public void computeScroll() {
462460 animationManager .computeFling ();
463461 }
464462
463+ @ Override
464+ protected void onAttachedToWindow () {
465+ super .onAttachedToWindow ();
466+ if (renderingHandlerThread == null ) {
467+ renderingHandlerThread = new HandlerThread ("PDF renderer" );
468+ }
469+ }
470+
465471 @ Override
466472 protected void onDetachedFromWindow () {
467473 recycle ();
@@ -753,6 +759,10 @@ void loadComplete(PdfFile pdfFile) {
753759
754760 this .pdfFile = pdfFile ;
755761
762+ if (renderingHandlerThread == null ) {
763+ renderingHandlerThread = new HandlerThread ("PDF renderer" );
764+ }
765+
756766 if (!renderingHandlerThread .isAlive ()) {
757767 renderingHandlerThread .start ();
758768 }
You can’t perform that action at this time.
0 commit comments