Hi,

No, position refers to the position of the item inside the adapter.
The position on screen is called the "index." Basically,
getAdapter.getItemId(position) == id. To get the index on screen of
the clicked item use position - getFirstVisiblePosition()

On Thu, Oct 23, 2008 at 12:43 PM, alexdonnini <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Am I correct in saying that in onitemclick ( onItemClick(AdapterView<?
>> parent, View view, int position, long id) )
>
> "position" refers to the position of the item being clicked on the
> screen while "id" refers to the row id of the item in the underlying
> data structure (or adapter?)?
>
> The documentation seems to indicate that this is the case but it's not
> 100% clear:
>
> Parameters
> parent  The AdapterView where the click happened.
> view    The view within the AdapterView that was clicked (this will be a
> view provided by the adapter)
> position        The position of the view in the adapter.
> id      The row id of the item that was clicked.
>
> Thanks.
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to