Created
June 14, 2018 12:41
-
-
Save JacquesInnocent/2d286e74fbbd652ad78e4c66d1af3010 to your computer and use it in GitHub Desktop.
Button intent to next activity.
Okay I get it now.
This method is a class method.
public void onClick(View v) {
if(v == findViewById(R.id.Button1)){
//do here what u wanna do.
}
else if(v == findViewById(R.id.Button2)){
//do here what u wanna do.
}
else if(v == findViewById(R.id.Button3)){
//do here what u wanna do.
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
buttonBack.setOnClickListener(this);
So you need an onclick method which listens for the id of the pressed button.