<justify>It is possible to retrieve the location of a view by invoking the methods getLeft() and getTop(). The former returns the left, or X, coordinate of the rectangle representing the view. The latter returns the top, or Y, coordinate of the rectangle representing the view. These methods both return the location of the view relative to its parent. For instance, when getLeft() returns 20, that means the view is located 20 pixels to the right of the left edge of its direct parent.
In addition, several convenience methods are offered to avoid unnecessary computations, namely getRight() and getBottom(). These methods return the coordinates of the right and bottom edges of the rectangle representing the view. For instance, calling getRight() is similar to the following computation: getLeft() + getWidth() (see Size for more information about the width.)</justify>
> It is possible to retrieve the location of a view by invoking the
> methods getLeft() and getTop(). The former returns the left, or X,
> coordinate of the rectangle representing the view. The latter returns
> the top, or Y, coordinate of the rectangle representing the view.
> These methods both return the location of the view relative to its
> parent. For instance, when getLeft() returns 20, that means the view
> is located 20 pixels to the right of the left edge of its direct
> parent.
>
> In addition, several convenience methods are offered to avoid
> unnecessary computations, namely getRight() and getBottom(). These
> methods return the coordinates of the right and bottom edges of the
> rectangle representing the view. For instance, calling getRight() is
> similar to the following computation: getLeft() + getWidth() (see Size
> for more information about the width.)
http://developer.android.com/reference/android/view/View.html
Retrieve the view using getItemAtPosition()