Thursday, May 2, 2013

[android help] How to relate db entries with listview items

android - How to relate db entries with listview items - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I'll explain shortly what I am trying to do. I have a custom listView which is filled in with the data from SQLite database. Once a list item is longclicked, it is added to favourites: I have a separate column in the database, where "1" is assigned for entries added to favourites. Everything is ok by this point.


What I want to do now is to mark favourite list items with stars. I want to make a query to db like SELECT text (id?) FROM info WHERE favourite = 1 and place a star near the corresponding list item. The problem is I don't know how to call the specific list item (checkbox?) by its position (or text?) and mark it as selected. How can I achieve that?



















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










lang-sql






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...