Then you need to cast the resulting item to a Cursor and use Cursor's method to read the value of the column you are interested in. Another approach, that was mentioned already, is simply to cast the view that was clicked into whatever view you use to represent the data and then ask the view for the data. For instance:
((TextView) clickedView).getText() On Thu, Jun 26, 2008 at 8:51 AM, Sylvester Steele <[EMAIL PROTECTED]> wrote: > > > > On Jun 26, 2:31 pm, "Romain Guy" <[EMAIL PROTECTED]> wrote: >> Somewhere, you must have created an Adapter and set it on the >> ListView. In your onItemClick() method, there's a parameter called >> position. It gives you the index of the clicked item in the adapter. >> You just need to call myAdapter.getItem(position) and you will get the >> result you want. >> > > I tried this. I want to set the string I get, as the title, so I do a > myAdapter.getItem(position).toString() , however this gives me > something like : > > [EMAIL PROTECTED] > > which is not the clicked item. This is a SimpleCursorAdapter. > > Thanks, > Sylvester > > > -- 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

