OK, I am having issues understanding how when using SQLite, how do you
display user friendly text for the view's text property, but assign it
a DB ID to be used internally to uniquely identify the field later?
For example here is a sample from my code:
SimpleCursorAdapter adapter = new
SimpleCursorAdapter( this,
android.R.layout.simple_list_item_2, c, new String[] { "combined",
"tAmount" }, new int[] {android.R.id.text1, android.R.id.text2} );
ListView lv =
(ListView)findViewById(R.id.ListView01);
lv.setAdapter( adapter );
registerForContextMenu(lv);
How can get the db "_id" field when the item is clicked and held for a
context menu in (onCreateContextMenu)? How do I assign it? My Cursor
has this field included, but how do I tell the adapter?
Thanks in advance for any help you can offer?
Thanks,
Chuck Syperski
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---