
Button demo
Button in android mostly used to get action from user.
You can get action from button in onClick() event.
In android button works same as it works in java.
Two ways to create Button in android
Using xml file in layout <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="My Button"/>
Using java code in activity class Button...