Why we use xml?

Corolex

New Member
We are creating many XML files for a single app in developing android applications; of course it's the main theme of android. For every screen of app we are creating an XML with some layouts (static implementation). In execution, every time XML file will be read to get all the resources that it wants to display the screen which we designed.The same design can be achieved by adding few lines in the java code itself (dynamic implementation). Like we can extend ListActivity instead of creating XML file, for example. Then why to go for XML as the application need to read a file from phone memory which may leads to slow access and makes application slow?So, dynamic implementation is always better than static one.Please correct me if I am wrong.
 
Back
Top