CursorAdapter breaks CHOICE_MODE_MULTIPLE option

倖福魔咒の 提交于 2019-12-04 17:14:58

In order for the ListView.CHOICE_MODE_MULTIPLE mode to work properly, each of the item in the adapter must return a unique value from the getItemId() method.

The cursor you are using for your adapter is produced on these lines:

  FinTracDatabase database = mDatabaseProvider.get();
  Cursor cursor = database.getTransactionCursor(false);

Could you check whether it has unique values on its "_id" column for each row? I am suspecting that they all share the same values, resulting in the behavior that you see.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!