Is there a “best practice” or noticeable difference in performance between using Java to do layouts in Android over XML?
For the sake of it, assume we are just laying out a relatively simple UI which uses multiple activities.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An advantage of XML layouts are better is that they permit to define multiple layouts with smaller code
for multi-language application u can define French and english UI and load the desired one at application startup
they permit to support many screen resolutions and orientation (define main.xml file for each profile)
also u can easily add and modify layout without touching u’r code
so, better to USE IT