![]() |
Selecting Female & pushing DISPLAY ⇒ |
![]() |
RadioButton
in your layout.
However, because radio buttons are mutually exclusive, you must group them together inside a RadioGroup
.
By grouping them together, the system ensures that only one radio button can be selected at a time.
RadioButton
object receives an on-click event.
To define the click event handler for a button, add the android:onClick
attribute to the RadioButton
element in your XML layout.
The value for this attribute must be the name of the method you want to call in response to a click event.
The activity hosting the layout must then implement the corresponding method.
However, this example uses another approach.
|
||||||||||||||||||||||||||||||||||||
|