compile xml layout files and use them

Is it possible to manually pre-compile a layout file, put it in a jar and use it? if possible how ?

I'll explain: When using a apk packaging, the build process pre compile xml resources, for runtime optimization. Let's say, for example, I want to load xml files from a server, and load them to ui. I need to pre-compile them, and I prefer doing it on server side with the android sdk.


try this:

  • put your xml file into your resource folder (for example into res/xml)
  • run your project
  • go to bin folder of your project
  • open youapplication.apk as zip-archive
  • go to res/xml folder of your archive
  • extract already compiled xml from that folder
  • use extracted xml as your complied xml file
  • 链接地址: http://www.djcxy.com/p/10764.html

    上一篇: 序列化前缀树

    下一篇: 编译xml布局文件并使用它们