After developing few applications, I know that many people like to add view programmatic ally. | |||
The layout XML you are creating is being translated at run-time to java code. So the answer to your question is Yes. You can do the same and basically create all your layout in java code from scratch. The obvious down grade of this thehnic as you know is that it will take you much more time to achieve the same result as with the XML file. | |||
Yes
According to the documentation the advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions 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 XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. Please read this link for more details | |||
default
.
stackoverflow.comm
No comments:
Post a Comment