android - Retrieving drag location on moving GridView -


my question relatively simple.

backstory

i utilize ondraglistener detect current touch location of user. ondraglistener registered gridview scrolls automatically while user touching.

issue

the ultimate problem if user stops moving finger (and holds stationary) there no location events monitored, triggered, etc.

any input on possible solutions wonderful.

you can use setontouchlistener method , set ontouchlistener ontouch method in it, , make sure ontouch method return false.then record dragevent in ondraglistener when location change. , use recorded dragevent in ontouch method whatever want.ontouch method continuously trigger long finger down, since location of drag not changing, using latest recorded dragevent serve well.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -