What could be the interest of creating a button (or any other widget) from an XML layout file rather than from the Java code of an activity?
Question 5
What could be the interest of creating a button (or any other widget) from an XML layout file rather than from the Java code of an activity?
1 point
It makes the display of the application faster.
The design view allows for a preview of the result without the need to deploy the app on a (real or emulated) device.
It separates the visual design and presentation aspects of the application from its control. Each aspect can even be taking care of by specialized persons.