问题描述
在附加图像中,SelectAll checkbox
出现在活动中,以及适配器中的所有 checkboxes
.如果我 checked SelectAll
然后在适配器中选中所有复选框,如果我取消选中则所有复选框都未选中.它发生得很好.
In attached image, SelectAll checkbox
is present with in an activity, and all checkboxes
within adapter.If i checked SelectAll
then all checkboxes are checked in adapter and if I unchecked then all are unchecked. Its happening nicely.
但是我想如果我选中SelectAll
,然后如果我uncheked
tha 适配器中的一个或多个复选框,那么SelectAll 复选框应该取消选中
.如果没有选中 SelectAll 如果我手动选中适配器中的所有复选框,则 SelectAll 复选框应自动选中
.
But I want if I checked SelectAll
and after that if i uncheked
one or more checkbox in tha adapter then the SelectAll checkbox should unchecked
.and if without check to SelectAll If i manually check all the checkboxes in adapter then SelectAll checkbox should checked
automatically.
我该怎么做.
下面是我的代码.,http://pastebin.com/5pUJJC42
推荐答案
我喜欢下面的内容,我得到了我需要的输出,
I did like below and I got my required output,
这篇关于多个复选框的notifyDataSetChanged的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!