Issue
It seems that a new layout must be created when a new Android activity is created with the wizard in Eclipse. Whenever I create a new Android activity using an existing layout, I have to create a dummy layout, change the layout in onCreate() with setContentView(), then delete the dummy layout.
What is the best way to do this?
Solution
Edited Post: If you click File > New > Other, you can choose "Android > Android Activity". Click next, and fill in the right data. If you reach the "Preview" part, you can select the changes that must be performed. I called the new activity "SecondActivity", which means the layout would file would be called "second_activity.xml". If you uncheck this file in the list, it won't create this file. Then just change your setContentView to the file you want.
Answered By - ian
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.