[Solved] how to start an another activity on button click [closed]


Use this:

  button.setOnClickListener(new View.OnClickListener() 
     {
          public void onClick(View v) {
            Intent i = new Intent(PresentActivity.this,NextActivity.class);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(i);
        }
     });

solved how to start an another activity on button click [closed]