Reputation: 711
I am a new android programmer and i am trying to create the following example:
http://learnandroid.blogspot.com/2008/01/opening-new-screen-in-android.html
I have created a second activity following the instructions from this previous question: Best way to add Activity to an Android project in Eclipse?
but i cant seem to get it to generate the second xml file for screen 2(from the example). I only seem to get one main.xml
Thanks
Upvotes: 0
Views: 1741
Reputation: 1
you can simply add a second activity by right-clicking on your navigator box, move the cursor to "New" and then click on "Android Application Project". After the click, a window will pop up and request for names and some other basic info of the second activity you want to create. Just type the information in and all files of the second activity you need should be automatically generated.
Upvotes: 0
Reputation: 15089
Right click on /res/layout
-> New, choose Android XML File
. Select layout
, name it screen2.xml
.
Now you can see it appear, just paste your screen 2 XML source into it.
Upvotes: 1