How to check all checkboxes at some specific event?

by Varun Batra » Mon, 28 Mar 2011 16:04:57 GMT


Sponsored Links
 Hi guys,

I am making an app which required my checkboxes to be checked at once
when i check the main checkbox.
I am using one normal checkbox widget which i am hoping will work as
my main checkbox and i am also using LIST of multiple
choice(simple_list_item_multiple_choice). Now i want to check all
these listview's checkbox when i check my main checkbox.

I am stuck at this part since last two days please help!!!!

Thanks,
Varundroid.

-- 



Re: How to check all checkboxes at some specific event?

by Mark Murphy » Mon, 28 Mar 2011 20:43:48 GMT


 Call setItemChecked() on the ListView for each position (0 to the size
of your list - 1).






-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

Android Training in NYC:  http://marakana.com/training/android/ 

-- 


Sponsored Links


Other Threads

1. Supressing Key presses in Activity, especially in Options Menu

Apps can intercept the call key to let the user press it when on a phone
number or other thing that makes sense to perform a call on.  They can't
intercept end call and home, though, so regardless of whether you consume
the call key you still need to deal with the user leaving your app at any
point.








-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~

2. Binder IPC

Hi.
I am trying to understand the IPC mechanism in Android.

I wanted to have a high level view of this whole mechanism
after a call to transact() is initiated.

Here is a typical scenario I have been trying to understand:

I have filched this from a post on this forum by dpras...@gmail.com:
"A binder object is an instance of a class that implements the IBinder
interface.
The term 'binder class' is used to refer to a concrete class whose
instances are
binder objects. In other words, a binder class directly or indirectly
implements
IBinder, and its instances are binder objects."

Now, IInterface also #includes Binder.h which #includes IBinder.h

A class implements the IInterface.h and exposes some
functions as an interface, which are typically pure virtual.

These are functions that those which should be used by other processes
for whom the object of this Binder class lies outside their address
space.

How is this logically done?

The file IInterface.h itself is more interesting.
It has two more interfaces,
BpInterface
BnInterface

Each of them have the onAsBinder() pure virtual function, which has to
be implemented by the Binder Class.
How and Why are these two interfaces used?

Now, onAsBinder() return an IBinder pointer. How does the flow of
control
follow up after that?

I have some very basic questions about the Binder IPC. Please shed
some light on them.

1) What does this IBinder pointer point to?
2) How does the IPC work?
3) Explain the working of the transact() function.
   3.1) Explain the Parcel objects  data , reply
   3.2) Who and How is transact() called?

Please go ahead and explain as much as you can about this whole IPC
ensemble.
Point out resources if there are any on this.

Thanks.

--~--~---------~--~----~------------~-------~--~----~

3. regarding phone calling

4. Thread lifecycle

5. Supressing Key presses in Activity, especially in Options Menu

6. Trying to stay up-to-date on new developments in Android SDK

7. Android development tutorial for beginners - writing a Twitter client