[Solved] How to make a button open a new activity


Set onClickListener on button in which onClick method start your activity using intent.

button.setOnClickListener(new View.OnClickListener() {   void onClick(View v) {
    Intent startA = new Intent(MainActivity.this, ActivityToStart.class);
    startActivity(startA);   } });

solved How to make a button open a new activity