2

I was wondering if it were possible to dynamically create an XML layout file to be displayed to the user. The idea would be to be able to retrieve a layout file from a central server, which could display this dynamic, server driven GUI.

2 Answers 2

2

XML layout files are packaged as binary and the inflation occurs from binary as well. I don't believe that arbitrary XML can be used for layout.

Sign up to request clarification or add additional context in comments.

Comments

1

You'll have a problem with the way resource IDs are pre-baked at build time.

Since GUI elements can be instantiated at runtime, you could probably roll your own inflater with an XML parser and a bit of reflection.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.