4. About Button
A Basic Button is often use to perform some sort of
actions, such as submitting a selection.
A basic Button control can contain a text or image label.
Within the xml layout resources, button are specified
using “<button>” element.
The Primary attribute for basic button is the field. This is
the label that appear on middle of button’s face.
Example. We often use button control with text
“ok”,”cancel” and “submit”.
4
5. JAVA File
5
1. Create a class implements the interface
button.setOnClickListener
2. Implement onClickListener() method
3. Perform the action on Button using the method void
onClick().
within the onClick() method, you are free to carry out
whatever action you need.