由_id的Android Listview SetItemChecked

时间:2012-07-17 15:46:03

标签: android android-listview simplecursoradapter

我有一个ListView填充了SimpleCursorAdapter(其中填充了_idpersonName)。我知道我要选择的_id,但函数setItemChecked(pos, boolean)使用position代替_id

我如何知道Cursor 3中_id中的位置?

1 个答案:

答案 0 :(得分:0)

获取包含您要查找的position的项目的_id。然后在通话position中使用setItemChecked(pos, boolean)