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!!

2 comments:

lauren said...

Thanks for providing info about opening a new window in Android. We can use this option.I also never knew how to do this.So It is very useful and informative.Thanks.
digital signature

Anonymous said...

Thanks for the info.