Skip to content

How to implement drag after long press? #1826

Closed Answered by JasonCareter
laptou asked this question in Q&A
Discussion options

You must be logged in to vote

well, you're supposed to use composition gestures . Passed a Gesture.Exclusive( longPressGesture, panGesture ) to the target View .
Make a SharedValue to record the state whether long press activated . So , you can activate the pan gesture manually inside the onTouchesMove callback when the long-press state is true . With this little change , you can get what you want as your question described .

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@Bayramito
Comment options

@JasonCareter
Comment options

@JasonCareter
Comment options

@Bayramito
Comment options

@JasonCareter
Comment options

Answer selected by laptou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants