I want to move the activity, after being pressed, the project application exits independently, please help me

Viewed 27
Intent mainIntent = new Intent(LoginMainActivity.this, MainActivity.class);                         startActivity(mainIntent)
1 Answers

Accordind the documentation, to start a new Activity you need to pass the context and start it like this:

Intent intent = new Intent(this, LoginMainActivity.class);
    
startActivity(intent);
Related