gpt4 book ai didi

android - AdapterContextMenuInfo.id

转载 作者:行者123 更新时间:2023-11-29 02:12:54 27 4
gpt4 key购买 nike

我在网上查过这个。所以我的理解是 AdapterContextMenuInfo.position 是 ListView 中项目的索引。

AdapterContextMenuInfo.id是Cursor中item的索引还是数据库中item的主键id?我已经将它用作数据库中项目的主键 id。游标是否按主键索引?

最佳答案

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

当您使用 CursorAdapter 时,它是 Cursor_id 列的值。

Are cursors indexed by primary key?

游标 没有索引,句号。但是,要使用 CursorAdapter,您必须在 Cursor 的结果集中有一个名为 _id 的列。

关于android - AdapterContextMenuInfo.id,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6208738/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com