From docs :
When your application is compiled, it aapt
generates a class R
that contains resource IDs
all of your resources res/ directory
. For each resource type, there is a subclass R
(for example, R.drawable
for all resources drawable
), and for each resource of this type, there is static integer
(for example, R.drawable.icon
). This integer is one resource ID
that can be used to retrieve resource
.
So the layout
files are compiled
( in a binary-like format
) as part of your project. If you were XML
not part of your project at build time, you will not be able to use it at time run-time
.
This is good practice / is it possible to download the XML layout from the server?
No, due to what I wrote above.
source
share