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!!!!



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)  |  | 

Android Training in NYC: 


Sponsored Links

Other Threads

1. How to set selection of editText by using SendKeyEvent function of InputConnection class

I need to set selection of an editText box via InputConnection. I used
the SendKeyEvent function with the KEYCODE_DPAD_LEFT and META_SHIFT_ON
state but I've had no luck. My code is as below:

// I've already received hardware key event of DPAD left key as event
parameter in this function.

// Change the meta state of event parameter to META_SHIFT_ON
event = new KeyEvent(event.getDownTime(), event.getEventTime(),
                        event.getAction(), event.getKeyCode(), 
                        event.getDeviceId(), event.getScanCode());
InputConnection ic = getCurrentInputConnection();

After excuting the code, there still no selection in the EditText.

Could somebody help me to resolve this ?

Thanks in advance.


2. ScaleAnimation problem


I have an application which is based on the AnimateDrawables sample,
but which uses ScaleAnimation rather than TranslateAnimation

The problem I have is that my image scales in the way I expect - but
it also moves! For example, if my image starts half way down the
screen on the left and I use an animation such as:

an = ScaleAnimation(1,2,1,2);

then the image doubles in size during the animation, but it also moves
to the right and down to near the bottom of the screen.

I've tried playing with the pivot values (setting them to 0, or to the
middle of the image, or to half of the image width and height) but I
get the same result.

Any ideas???

3. Desktop API of Gears API does not work on Android browser for 1.5

4. AudioRecord can't get any notification when record/marker position updated

5. Can not read apk file on android emulator - SDK 1.1

6. How to setup Access Point parameters programmatically

7. HelloWorld problems