开发者

AdapterContextMenuInfo.id

开发者 https://www.devze.com 2023-03-10 06:36 出处:网络
I have looked online about this. So my understanding is that Ada开发者_运维问答pterContextMenuInfo.position is the index of the item in the listview.

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

精彩评论

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