Re: [android-developers] DB Id's vs ListView

2011-04-27 Thread Dianne Hackborn
There is no need to pull the ID for each item. And there is definitely no need to put all of this data in an array...!!! Don't do that, you kill performance by causing you to have to load everything out of the cursor. Note that ListView and many other things rely on a cursor always having a

Re: [android-developers] DB Id's vs ListView

2011-04-26 Thread TreKing
On Sat, Apr 23, 2011 at 12:36 AM, Guy Cothal g...@guycothal.com wrote: HOW DO I GET THE ID FOR THE RECORD You will have some data structure that holds you data, say Record. This will be the content of the Adapter that backs your ListView. When you select an item in the ListView it indexes the

Re: [android-developers] DB Id's vs ListView

2011-04-26 Thread Kapil Lokhande
Hi Guy, Its so simple as you are setting adpter for listview from data structure e.g. array,arraylist,linkedlist u can use two arraylist or any other in which one stores name to display on listview and other stores id. now these two arraylists will have same size. and clicking on one item in list

[android-developers] DB Id's vs ListView

2011-04-25 Thread Guy Cothal
Hey all, I am new to Android dev but VERY experienced in DB/Web dev...I currently have my app talking to my web server to get a list of data based off a query...like searching for a song...I know how to send it and even how to parse it into an array...but here is where I am a little fuzzy...I am