Android Button represents a push button. The android. widget. Button is a subclass of TextView class and CompoundButton is the subclass of the Button class.
There are different types of buttons in android such as RadioButton, ToggleButton, CompoundButton, etc.
Android Button Example with Listener in java
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//code
}
});
Or In XML
<Button
android:onClick="methodName"
/>
These are the login and signup buttons
Comments