Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Touch event interception during swipe #406

Open
@MMKrivtsov

Description

@MMKrivtsov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions