Layout values of an unloaded layout?

Kevin

Well-Known Member
Licensed User
Longtime User
If this has already been covered in the forum or docs, please point me in the right direction.......

My app contains 3 layouts that essentially do the same thing, but certain views are in a different position, sized differently, or are visible / not visible.

When the user chooses a variation of the 'interface', I am using activity.LoadLayout ("MyLayout"). I know I can't do anything about the time it takes to initially load in the images for the layout, but currently when the user switches to a different 'interface', I am removing the views then calling LoadLayout again (this time for example "MyLayout2") for the new 'interface'. Doing it this way causes a delay as all of the views are once again loaded in, when they were pretty much already loaded in before.

What I am wondering is if I could somehow load in only the properties of the views in another layout then modify the properties of those same views in the currently loaded layout on the fly, without reloading them.

I know this could be done with code rather than using different layouts, but this is my remote control app and the size and positioning are tricky across the different layouts and layout variants.

I hope this makes sense. :)
 

margret

Well-Known Member
Licensed User
Longtime User
Layouts

I don't know of any way to do it. As you said you can do it in code. You might use the designer to layout each screen/layout file that you need. Now chart the positions and size of each of the controls shown in each layout. Now you can do it in code and know the size and location of each view/control. Just an idea.

Margret
 
Upvote 0
Top