When used with ScorllView(or horizontal) inside SwipeLayout, the swipe gesture may conflict with the scroll action. If use requestDisallowInterceptTouchEvent, the scroll action will be back but the parent ListView's scroll action may be disallowed too. This patch solved this problem by introducing a "SwipeDenier" interface whose implementation should return if this swipe event should be denied. When onInterceptTouchEvent is called, SwipeLayout will call all SwipeDenier and if one of them returns true, the event will not be intercepted and passed to child views. Tested in app: https://github.com/PaperAirplane-Dev-Team/BlackLight which requires HorizontalScrollView inside SwipeLayout Signed-off-by: Peter Cai <xqsx43cxy@126.com> |
||
|---|---|---|
| .. | ||
| src/main | ||
| .gitignore | ||
| build.gradle | ||
| gradle-mvn-push.gradle | ||
| gradle.properties | ||
| proguard-rules.pro | ||