How do you archieve that? LoadLayout will load the layout from the Files folder which is, for the running app, readonly.In that case, yes, you could download it and make it active by LoadLayout
I need download it from server and load it in my app.How do you archieve that? LoadLayout will load the layout from the Files folder which is, for the running app, readonly.
Download from server(external) and load it in appHi,
I'm not sure to fully understand your question. As you know we have LoadLayout to load a layout designed in the Internal Designer. So you could prepare more than one alternative for a specific Activity and then load the desidered one based on code, settings, whatever.
By "external" do you mean available on a server of yours? In that case, yes, you could download it and make it active by LoadLayout. A key point will be that all the alternative layouts should sport objects named in the same way and your Activity's code should know about them.
In my understanding (never tried); noI need download it from server and load it in my app.
Can i?
It is difficultIn my understanding (never tried); no
BUT you can for sure create the complete layout by Code based on the information you downloaded from your server. You need to build a good structure to define the needed informations which you use to build the layout by code...
Yes it use it.But it load xml layout from Objects\res.Can i copy from to it folder?Probably yes. Search for XMLLayoutBuilder.
I never worked with it.
Maybe it be in new version b4a?It is currently not possible to load layouts that were not added to the Files folder.
What?A while ago I had a similar requirement. I wanted my layout to be defined at runtime based on some design related information. As others have noted, it is not possible for you to define BAL or Android XML layouts and push them from your server to the client. But there's nothing stopping you from defining your own XML layout format and passing that to the server.
In my case, I used a XML layout description containing tables, rows and columns which I then pushed to my app and the app parsed this XML to create the appropriate layout. My use case was quite complex because I needed validation on the dynamically created controls as well as event listeners on the server for app events but it is certainly not too difficult.
As I said, it's not too difficult. You just need to create a 'data model' for your layout, create an instance of it and store in an appropriate format (xml or json for example) on the server and then read it in your code and create the appropriate views. If you state your actual app requirements, I (or in fact many others) may be able to help you think through your options.What?