list: keep the swipe underlay visible through the spring-back
This commit is contained in:
@@ -123,7 +123,8 @@ class SwipeActionsCallback(
|
||||
} else {
|
||||
dX
|
||||
}
|
||||
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE && isCurrentlyActive) {
|
||||
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {
|
||||
if (isCurrentlyActive) {
|
||||
// Arm when the finger passes the cell; disarm when pulled back inside it.
|
||||
val raw = abs(dX)
|
||||
val reveal = revealWidth(viewHolder).toFloat()
|
||||
@@ -134,6 +135,8 @@ class SwipeActionsCallback(
|
||||
armedViewHolder = null
|
||||
armedAction = null
|
||||
}
|
||||
}
|
||||
// Draw whenever the row is displaced, including the spring-back's frames.
|
||||
if (clampedDX != 0f) {
|
||||
drawUnderlay(c, viewHolder, clampedDX)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user