onclicklistener android button 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: button android stdui
Button b = findById();