Showing posts with label android beginner open new activity window intent reference. Show all posts
Showing posts with label android beginner open new activity window intent reference. Show all posts

Wednesday, May 5, 2010

Android - Opening a new "window" activity

I'm playing around with some android development for work and found this post helpful as a newbee.


Basically all you have to do is:

1. Add the following to your AndroidManifest.xml file:

2. Create the NewActivity class

3. On the button press or whenever you want to see the new activity launched call something like this:

Intent i = new Intent(MainActivity.this, NewActivity.class);
startActivity(i);

That's it!!