rogcg
rogcg

Reputation: 10471

Create clickable item on listview

How to make a clickable item in a listview and get the data directly from the DB when clicking it? Should I use a cursor and get the column names in the cursor??

Upvotes: 1

Views: 703

Answers (2)

Tushar Vengurlekar
Tushar Vengurlekar

Reputation: 7679

Yes you can make use of simpleadapter and cursor. Pick the position clicked on the list and retrieve data from the same position in cursor.

Upvotes: 0

jtt
jtt

Reputation: 13541

Simple, create a SimpleCursorAdapter and interface it with your database with a given layout. Once you have this then you can immediately pull from the callback on the listview and then cast it to the same type (cursor) then then pull information relative to that specific row and you should be golden!

Upvotes: 1

Related Questions