android-dynamic-layouts
android-dynamic-layouts copied to clipboard
Convert the xml to binarry
Hi, As I understand I can only use this to load binary XML file. like the ones you have here: https://github.com/gvaish/android-dynamic-layouts/tree/master/app/src/main/res/raw
How did you create them? Is there any way to load normal XML files?
@gilshallem Yes. That's the whole idea.
- Creating binary XML: Needs to be obtained as part of the build process. One option is to extract it from the final APK. Other option is to update the
compile resources
(aapt
) step of the gradle task and copy over the compiled layouts to another folder. In the sample project, it was manually extracted from the APK. - Load normal XML files: That's precisely I want to avoid. Loading plain-text XML is extremely slow.