public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initControls();
}
I’m a noob android coder. I have written a one-screen app that functions as I want, but I’d like to add additional screens, i.e press a button and a new screen opens, press a button, previous screen is restored. How can I add views to my program? My one xml file is res/layout/main.xml. How can I add additional views and switch between them at will? I’m using ant and the console to develop…no Eclipse.
Thanks for helping a noob 🙂
You have to take a Look at Intents and Activties.. Here is a good example.
http://www.vogella.com/articles/AndroidIntent/article.html
http://marakana.com/forums/android/examples/65.html
Intents are used to pass from one actvity to another and Activity is simply a screen with UI widgets on it to interact.