Skip to content

Commit 8c8fc28

Browse files
committed
Fix crash when there is no background on SwipeActionView
1 parent ad5d64b commit 8c8fc28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/kotlin/me/thanel/swipeactionview/SwipeActionView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class SwipeActionView : FrameLayout {
549549
rightSwipeView?.let { drawChild(canvas, it, drawingTime) }
550550
}
551551

552-
if (!alwaysDrawBackground) {
552+
if (!alwaysDrawBackground && background != null) {
553553
// Restore original bounds only after drawing background views
554554
canvas.restoreToCount(saveCount)
555555
}

0 commit comments

Comments
 (0)