I am trying to dynamically inflate an layout xml file. The file should later come from a server so the Android app (client) will download it and load the layout.
I know that its impossible to do this with a plain layout file because for performance reasons the layout xml is somehow converted before and the LayoutInflater only works with some sort of binary Xml.
Now my question. Would it be possible to convert the "normal" layout xml file into a binary xml file on the server and then send it to the client so the LayoutInflater can load the binary xml from the server?
Thanks for any help in advance
Yes, it is possible. But you'll have to create android.view.ContextThemeWrapper subclass and use 2 private methods of Android framework: