android - How to override the getItemId(int pos) method from CursorAdapter? -
i getting question due answer on here, didn't explain how asking how id of row in onitemclick(listview) when using custom adapter?
the answer accepted in question need since making own custom adapter (cursoradapter), hence have same problem. problem have no idea how accomplish that. looking @ doc, , not sure how access _id column cursor. since doc doesn't have constant can info i'm stuck. figuring out appreciated.
edit: not clear on question was, clarify, title, how can override getitemid() method in cursoradapter custom class created?
assuming don't have cursor member of adapter:
@override public long getitemid(int position) { cursor cursor = getcursor(); cursor.movetoposition(position); return cursor.getlong(mcursor.getcolumnindex("_id")); }
Comments
Post a Comment