pointToPosition in GridView does not work
Posted
by
Unstoppable
on Stack Overflow
See other posts from Stack Overflow
or by Unstoppable
Published on 2013-11-10T09:50:48Z
Indexed on
2013/11/10
9:52 UTC
Read the original article
Hit count: 576
I have this code:
long position = imageAdapter.getItemId (gridView.pointToPosition(
(int) event.getX() (int) event.getY()));
Theoretically, this code should work, but when I display information Log.d function, I always get a "0" position. What am I doing wrong?
PS. The code I have implemented the method public void onMyGridTouch
from this topic -> Dynamically change the image color layout in a row in a GridView
© Stack Overflow or respective owner