Checkboxes: Layout File

CheckBox class
A checkbox is a specific type of two-states button that can be either checked or unchecked.
There are four IDs declared in this layout file:
Selecting
iPhone &
Android and

pushing
DISPLAY


MyApplication/app/src/main/res/layout/activity_main.xml
01<?xml version="1.0" encoding="utf-8"?>
02<LinearLayout
04  android:layout_width  = "match_parent"
05  android:layout_height = "match_parent"
06  android:orientation   = "vertical"
07  android:gravity       = "center">
08  <CheckBox
09    android:id            = "@+id/chkIos"
10    android:layout_width  = "wrap_content"
11    android:layout_height = "wrap_content"
12    android:text          = "iPhone" />
13  <CheckBox
14    android:id            = "@+id/chkAndroid"
15    android:layout_width  = "wrap_content"
16    android:layout_height = "wrap_content"
17    android:text          = "Android"
18    android:checked       = "true" />
19  <CheckBox
20    android:id            = "@+id/chkWindows"
21    android:layout_width  = "wrap_content"
22    android:layout_height = "wrap_content"
23    android:text          = "Windows Phone" />
24  <Button
25    android:id            = "@+id/btnDisplay"
26    android:layout_width  = "wrap_content"
27    android:layout_height = "wrap_content"
28    android:text          = "DISPLAY" />
29</LinearLayout>




      We learn from failure, not from success!    
      ― Bram Stoker, Dracula