Skip to content

Commit 39d1056

Browse files
committed
Merge upstream pull request DImuthuUpe#824
Fix previous merge
2 parents fa37f5f + 3b691a8 commit 39d1056

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ ScrollHandle getScrollHandle() {
258258
public PDFView(Context context, AttributeSet set) {
259259
super(context, set);
260260

261-
renderingHandlerThread = new HandlerThread("PDF renderer");
262-
263261
if (isInEditMode()) {
264262
return;
265263
}
@@ -476,6 +474,12 @@ public void computeScroll() {
476474
animationManager.computeFling();
477475
}
478476

477+
@Override
478+
protected void onAttachedToWindow() {
479+
super.onAttachedToWindow();
480+
renderingHandlerThread = new HandlerThread("PDF renderer");
481+
}
482+
479483
@Override
480484
protected void onDetachedFromWindow() {
481485
recycle();

sample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:label="@string/app_name"
99
android:theme="@style/Theme.AppCompat.Light">
1010
<activity
11-
android:name="PDFViewActivity"
11+
android:name="PDFViewActivity_"
1212
android:label="@string/app_name" >
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />

0 commit comments

Comments
 (0)