Gregor Menih
Gregor Menih

Reputation: 5116

Android app: How to create a new window?

I'm pretty new to Android applications. What I have at the moment is an "app", which displays a login screen, and users can log in. What I want is, if the login is correct, to "forward" or open a new window, where users can change some settings etc... So really, I only need help with creating a new window. How would one do that? Make a new activity perhaps?

Thanks

Upvotes: 2

Views: 6694

Answers (1)

J. Maes
J. Maes

Reputation: 6892

That's right, you just start a new activity with startActivity()

Intent intent = new Intent();
 intent.setClass(this,SecondActivity.class);
 startActivity(intent);

This means the class you come from, so the current one. SecondActivity is the activity you want to start.

Upvotes: 2

Related Questions