SurfaceView jitters and moves the wrong way when mDragDistance < 0.
This can be easily reproduced by setting either swipe:rightEdgeSwipeOffset or swipe:leftEdgeSwipeOffset to be much greater than the bottom View's measuredWidth. For example, I set swipe:rightEdgeSwipeOffset=180dp in recyclerview_item.xml. Upon running the recyclerview section of the demo, swiping any recyclerview item will demonstrate the problem.
The mere existance of layout xml attributes swipe:rightEdgeSwipeOffset or swipe:leftEdgeSwipeOffset invites the developer to set random numbers which could break the swiping functionality, that is why I think this should not only be documented, but fixed in code to prevent developer error.
I would like to submit a pull request, my proposed solution is to set mDragDistance=0 (which will effectively disable swiping) whenver the xxxEdgeSwipeOffset exceeds the currentBottomView.getMeasuredWidth(), or is there a better solution to this issue ?
SurfaceView jitters and moves the wrong way when mDragDistance < 0. This can be easily reproduced by setting either
swipe:rightEdgeSwipeOffset
orswipe:leftEdgeSwipeOffset
to be much greater than the bottom View's measuredWidth. For example, I setswipe:rightEdgeSwipeOffset=180dp
inrecyclerview_item.xml
. Upon running the recyclerview section of the demo, swiping any recyclerview item will demonstrate the problem.The mere existance of layout xml attributes
swipe:rightEdgeSwipeOffset
orswipe:leftEdgeSwipeOffset
invites the developer to set random numbers which could break the swiping functionality, that is why I think this should not only be documented, but fixed in code to prevent developer error.I would like to submit a pull request, my proposed solution is to set
mDragDistance=0
(which will effectively disable swiping) whenver thexxxEdgeSwipeOffset
exceeds thecurrentBottomView.getMeasuredWidth()
, or is there a better solution to this issue ?