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

Commit f14ad2e

Browse files
committed
Merge branch 'Miha-x64-patch-1'
2 parents 395ceaa + e3e05e6 commit f14ad2e

File tree

1 file changed

+7
-1
lines changed
  • android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import android.graphics.PointF;
2525
import android.graphics.Rect;
2626
import android.graphics.RectF;
27+
import android.graphics.drawable.Drawable;
2728
import android.net.Uri;
2829
import android.os.AsyncTask;
2930
import android.util.AttributeSet;
@@ -508,7 +509,12 @@ protected void onDraw(Canvas canvas) {
508509
// abstraction of the screen position when rendering the parts.
509510

510511
// Draws background
511-
canvas.drawColor(Color.WHITE);
512+
Drawable bg = getBackground();
513+
if (bg == null) {
514+
canvas.drawColor(Color.WHITE);
515+
} else {
516+
bg.draw(canvas);
517+
}
512518

513519
if (recycled) {
514520
return;

0 commit comments

Comments
 (0)