GridView item list selector for multiple items not working in Android

后端 未结 5 833
粉色の甜心
粉色の甜心 2021-01-08 01:30

I want to draw selector on long press as shown in the picture. When I do long press on one item, the CAB menu is activated. But the list selector indicator goes off once aft

5条回答
  •  广开言路
    2021-01-08 02:07

    Give padding in your grid item. Maintain bean class for each object in grid adapter to track object is selected or unselected. Based on this value you can update your grid item background color acc to state selected/unselected. Update the object value in onitemclieck listner and also view background.

提交回复
热议问题