folks. I'm beginning Android development and all of the tutoring videos constantly mention XML file. I looked up the meaning of XML which says:"XML was designed to describe data." But WHY is XML needed in Android and in general(please explain in simple understandable words)? Is there any way to create projects w/o XML file? Thanks in advance!
According to Android documentation:
The advantage to declaring your
XMLis that it enables you to better separate the presentation of your application from the code that controls its behavior. Your
UIdescriptions are external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create
XMLlayouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in
XMLmakes it easier to visualize the structure of your
UI, so it's easier to debug problems.
XMLvocabulary, you can quickly design
UIlayouts and the screen elements they contain, in the same way you create web pages in
HTML— with a series of nested elements.