YES, you can precompile your xml layout files and put them in the assets / pack folder, and then pack them into your jar file, after which you can load them using XmlResourceParser and LayoutInflater. Other resource files, such as an image, can also be packaged in jar, like this.
source share