getItemIdAtPosition() problem in Android?
Posted
by Praveen Chandrasekaran
on Stack Overflow
See other posts from Stack Overflow
or by Praveen Chandrasekaran
Published on 2010-05-31T14:36:41Z
Indexed on
2010/05/31
17:13 UTC
Read the original article
Hit count: 281
I am using the getItemIdAtPosition() to get the Basecoulmns id of the record in Sqlite Database.
the code is below:
protected void onListItemClick(ListView l, View v, int position, long id) {
Cursor cursor = managedQuery(Constants.CONTENT_URI,
PROJECTION, BaseColumns._ID + "="
+ l.getItemIdAtPosition(position), null, null);
}
But its does not retrieves the id correctly. Is this method depends some thing at the time of setting adapter or creation of DB? I have no idea. why it shows the position of the listview. Any Idea?
© Stack Overflow or respective owner