开发者

AdapterContextMenuInfo.id

I have looked online about this. So my understanding is that Ada开发者_运维问答pterContextMenuInfo.position is the index of the item in the listview.

Is AdapterContextMenuInfo.id the index of the item in the Cursor or the primary key id of the item in the database? I have used it as the primary key id of the item in the database. Are cursors indexed by primary key?


Is AdapterContextMenuInfo.id the index of the item in the Cursor or the primary key id of the item in the database?

It is the value of the _id column that is inside your Cursor, when you are using a CursorAdapter.

Are cursors indexed by primary key?

Cursors are not indexed, period. However, to use CursorAdapter, you must have a column in the Cursor's result set that has the name _id.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜