Reputation: 7318
I found PointerInputScope.detectTapGestures, which allow us to provide callbacks for single and double taps, but I would like a triple tap as well.
Should I copy the source code for detectTapGestures
and add another if
block under // Second tap down detected
to check for the third tap? Is there a better way?
Upvotes: 1
Views: 938
Reputation: 106
You can, if you save the last two click times and you can compare this times. For example if at 08:55:40,08:55:50 and after that in the next click you should get 3rd click time and compare these 3 if there is a small differences then you can say yes its a triple click or no its not a triple click.
Upvotes: 1