Select multiple items from listview and change color of selected item only

后端 未结 7 690
面向向阳花
面向向阳花 2020-12-30 13:40

I want to make a view where I can select multiple items from listview and also side by side am changing the color of selected list item and saving that item into my arraylis

相关标签:
7条回答
  • 2020-12-30 14:17

    A correction about the answer given by @JasonRobinson:

    if(selectedIds.contains(pos) {
             selectedIds.remove(pos); -> **selectedIds.remove(selectedIds.indexOf(pos));**
         }
         else {
             selectedIds.add(pos);
         }
    
    0 讨论(0)
提交回复
热议问题