android-dynamic-layouts icon indicating copy to clipboard operation
android-dynamic-layouts copied to clipboard

Convert the xml to binarry

Open gilshallem opened this issue 8 years ago • 1 comments

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 avatar Jun 29 '16 10:06 gilshallem

@gilshallem Yes. That's the whole idea.

  1. 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.
  2. Load normal XML files: That's precisely I want to avoid. Loading plain-text XML is extremely slow.

gvaish avatar Jun 29 '16 17:06 gvaish