daimajia / daimajia/AndroidSwipeLayout
SurfaceView misbehaves when mDragDistance < 0
- Dominant language
- Java
- Stars
- 12.3k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
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 ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.