notifyDataSetChanged多个复选框 [英] notifyDataSetChanged for multiple checkboxes

查看:176
本文介绍了notifyDataSetChanged多个复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在附加的图像,全选复选框是一个活动present,所有复选框中的适配器。 如果我检查全选那么所有复选框在适配器检查,如果我未选中,则所有未被选中。事情发生得很好。

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.

但我想,如果我检查全选之后,如果我 uncheked 在临屋适配器一个或多个复选框,然后在全选复选框取消选中应。 如果不检查,以全选。如果我手动检查所有的复选框适配器则全选复选框选中要自动。

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.

我如何能做到这一点。

波纹管是我的code, http://pastebin.com/5pUJJC42

bellow is my code., http://pastebin.com/5pUJJC42

推荐答案

我不喜欢下面,我得到了我需要的输出,

I did like below and I got my required output,

http://pastebin.com/PgNeDnXq

这篇关于notifyDataSetChanged多个复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆