07.01.2013 Views

David Defour - Université de Perpignan

David Defour - Université de Perpignan

David Defour - Université de Perpignan

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHECKBOX<br />

• I<strong>de</strong>a<br />

• A button with two states (checked and unchecked)<br />

• Has visual indicator to show whether it is checked<br />

• In Java, use isChecked() to <strong>de</strong>termine state. Use setChecked to<br />

programmatically change the state.<br />

• Same text in both states (unlike ToggleButton)<br />

• Main Listener types<br />

• View.OnClickListener<br />

• No Listener at all<br />

• Take no action when CheckBox is clicked, but instead query the CheckBox<br />

later to find if it is checked or not<br />

• Key XML attributes<br />

• android:text, android:onClick<br />

• Same as in previous examples<br />

jeudi 26 janvier 12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!