well, android does the hard work for you, but not all work ....
first, all you need to forget about parsing xml layouts ... instead, you can make a skeleton layout that controls its internal child position, size, etc .... and then inflate this "skeleton" xml with LayoutInflater and get view instance ...
When you have a View instance, you can do what you want with it, applying user preferences such as backgrouds, foreground colors, position, size, etc.
Perhaps I do not understand your question, but you can get any view that is inflated from the xml resource at compile time, and then apply a different style or set other properties
Franco
source share