Android - Custom ListView Adapter - Multi Selection remove - Indexoutofbounds - why?

前端 未结 6 501
终归单人心
终归单人心 2021-01-18 11:01

I have a custom Listview using a adapter class to extend ArrayAdapter of a Item class. I have the ability to change between choice modes of NONE,Single and Multi. This all

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-18 11:16

    Edit as :

    for (int i = checkedItemsCount-1; i >= 0 ; i--) {
                                              ^^^^^
    

    INSTED OF

    for (int i = checkedItemsCount-1; i >= 0 ; --i) {
    

提交回复
热议问题