On Sat, Sep 11, 2010 at 7:54 AM, Mystique <[email protected]> wrote:
> Hi, i can add to a db and list as a listview.
> When I click a list item using onListItemClick, what statement do I
> need to get the value?

:: snip ::

>    public void onListItemClick(ListView parent, View v, int position,
> long id) {
>
>        // What statement to put here to get the value of _ID,
> DESCRIPTION, UN
>        // selected?
>    }

The fourth parameter (id) is _ID. The third parameter (position) can
be used with moveToPosition() on your Cursor to access anything else
you may need.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to