ojnab
March 13, 2018, 10:52pm
1
I am working on some custom swipe gestures added to a widget tableview. For example swipe up to bring up the keyboard. In order to do this I need to cancel touch on the tableview, when the swipe gesture action takes over.
I peeked in the tableview source code but can’t really figure out what to do.
Any suggestions or help appreciated. Thanks
Why not defer bringing up the keyboard till the finger is lifted?
Am I misunderstanding?
ojnab
March 13, 2018, 11:56pm
3
See the swipe gestures in apps like messenger and slack and you will know what I mean.
To do this kind of stuff I need to cancel the touch.
Add a transparent rect on top of your app and decide which events to propagate to your UI below
ojnab
March 14, 2018, 12:23am
5
@SphereGS
That could be another approach.
I just found another solution though.
When the swipe gesture is recognised I set tableView.setIsLocked(true) and in the ended phase I unlock it again.
Thanks
Why not defer bringing up the keyboard till the finger is lifted?
Am I misunderstanding?
ojnab
March 13, 2018, 11:56pm
7
See the swipe gestures in apps like messenger and slack and you will know what I mean.
To do this kind of stuff I need to cancel the touch.
Add a transparent rect on top of your app and decide which events to propagate to your UI below
ojnab
March 14, 2018, 12:23am
9
@SphereGS
That could be another approach.
I just found another solution though.
When the swipe gesture is recognised I set tableView.setIsLocked(true) and in the ended phase I unlock it again.
Thanks