How to work with multiple activities in designer ?

dim

Member
Licensed User
Longtime User
Hi guys, that's my second question today that I bought basic4android. Please help if possible :
Well, on a new project I open the designer and add a button and a label with the text Activity1 on it. Save and run OK.
Now, since I read that I can use Activities like forms, I want to create a new activity and and other components on it. So I close the designer (to be sure that it will be refreshed when opened) I add a new Activity in the project (named Activity2), save the project, select the newly created Activity2 tab on the top next to "Main" activity tab, and now I hope that I am ready to add components to the second activity. So, I open the designer and I see the first Activities components (the button and the label).
How is it possible to make the designer deal with the second Activity and any other activity that I might add in the project ?
Thank you.
 

Mahares

Expert
Licensed User
Longtime User
All you need to do is open the designer and click 'New'. You will be shown a blank black screen. Add views to it and save it as a new layout, example: "MyLO". Then you can load that layout from within the second activity module if you want:
Activity.Loadlayout("MyLO")
I hope I understood the question.
 
Last edited:
Upvote 0
Top