Touch event interception during swipe #406
Description
Currently if there is scrolling view (ex. RecyclerView) inside of MotionLayout
, this view grabs touch events preventing transitions with swipe over that view. Method onInterceptTouchEvent
can handle and intercept touches if touch region id is set, but in that case it uses onTouchEvent
and it returns true even if touch is not swipe yet, preventing interaction with child views.
I suppose it would be good to have (at least option) to return result of this.mScene.processTouchEvent(...)
instead of true, which in turn would return result of this.mCurrentTransition.mTouchResponse.processTouchEvent(...)
and that one would return value of mDragStarted
.
Or at least make more getters for accessing such fields: getter for current scene in MotionLayout
, make TouchResponse
class public and add getter for mDragStarted
in TouchResponse
. Maybe getter for mCurrentTransition
in MotionScene
too, but it can be accessed with bestTransitionFor()
, so separate getter is not necessary now.