Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3cff366

Browse files
authored
Draw the specified background if present
1 parent 0347a36 commit 3cff366

File tree

1 file changed

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

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,12 @@ protected void onDraw(Canvas canvas) {
494494
// abstraction of the screen position when rendering the parts.
495495

496496
// Draws background
497-
canvas.drawColor(Color.WHITE);
497+
Drawable bg = getBackground();
498+
if (bg == null) {
499+
canvas.drawColor(Color.WHITE);
500+
} else {
501+
bg.draw(canvas);
502+
}
498503

499504
if(recycled) {
500505
return;

0 commit comments

Comments
 (0)