A Check-box in android is used to select values by checking them in the available list of values.

In this tutorial i will show a check-box to select values from present three values user can select any value or all the available values and on clicking submit button selected value is toasted one by one.

MainActivity.java

 

Add check boxes in layout file.

activity_main.xml

AndroidManifest.xml

Output :

 

checkbox1

 

checkbox2

Show Buttons
Hide Buttons
Read previous post:
Android Tutorial on Alert-box

Close