Android Question Designer Layouts not saved with Project?

Danamo

Member
Licensed User
Sorry if this is a stupid question or if I'm posting it in the wrong place. I'm new here, but am excited to have purchased B4A and to begin creating my own apps now so I hope you will bear with me!

My B4A project has several Activities, each with their own Designer layouts. When I open my saved project, I have the code editing window with tabs for the Activities, but going to the Designer for each Activity just presents me with a blank new layout instead of the layout for the Activity. I can open the layouts from files manually, but shouldn't the project know which layouts are associated with the Activities in my project? Am I doing something wrong, or are layouts not saved too when saving a project?
 

Knoppi

Active Member
Licensed User
Longtime User
Your Layout files saved with the project.
In IDE Tab [Files Manager] you can click on 'your_layout.bal (open Designer)' and the Layout opens.
open_designer.png
 
Upvote 0

Danamo

Member
Licensed User
The layouts are not associated with the activities you will have to open them using the designer as needed.
Okay, thanks for your quick response! I guess from working with Visual Basic I expected that form layouts should automatically be associated with the code for the forms - or in this case, Activities - so I thought I was doing something wrong in my project.
 
Upvote 0

Danamo

Member
Licensed User
Your Layout files saved with the project.
In IDE Tab [Files Manager] you can click on 'your_layout.bal (open Designer)' and the Layout opens.
View attachment 60456

Thanks for the tip! The first time I re-opened my project and the designer didn't show my layouts that I had worked so hard to make, I thought my layouts had got lost or deleted somehow and I was in "panic mode." LOL.

Now you explained the easy way to get to my layouts / designer. Thanks again!
 
Upvote 0

udg

Expert
Licensed User
Longtime User
There's a reason why a layout is not associated with a specific Activity: it could be loaded by different activities.
Another point is that you can use your layouts not only for activities but for other objects too, like a panel, just to mention one possibility.
 
Upvote 0

Danamo

Member
Licensed User
There's a reason why a layout is not associated with a specific Activity: it could be loaded by different activities.
Another point is that you can use your layouts not only for activities but for other objects too, like a panel, just to mention one possibility.

I do understand now. It's just that being used to Visual Studio I kind of freaked out when I opened my project and went to the Designer and it was blank, LOL.
 
Upvote 0
Top