Last active
September 12, 2018 11:38
-
-
Save keinix/d620b73b4c613645f64908d726d1982b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (dX > 0) { // Swiping to the right | |
background.setBounds(itemView.getLeft(), itemView.getTop(), | |
itemView.getLeft() + ((int) dX) + backgroundCornerOffset, | |
itemView.getBottom()); | |
} else if (dX < 0) { // Swiping to the left | |
background.setBounds(itemView.getRight() + ((int) dX) - backgroundCornerOffset, | |
itemView.getTop(), itemView.getRight(), itemView.getBottom()); | |
} else { // view is unSwiped | |
background.setBounds(0, 0, 0, 0); | |
} | |
background.draw(c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment