android studio button onclick listener code example
Example 1: onclicklistener in android studio
Name.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this,FileName.class));
}
});
Example 2: android java buttons
public void clickFunction(View view)
/* Text attributes + onClick (in this case: clickFunction)
Basics: Constraint list / layout margin */