I\'m new to Android development and have started creating my own UI. I see that you can either create it dynamically something like this (Dynamic Layouts):
@
I would recommend using xml layouts for most parts of your projects. You can put the layouts in different folders such as:
layout-land -> for landscape
layout-port -> for portrait
layout-v15 -> for android version >= 15
layout-sw600dp -> for screens with a certain width
Using these resource classifiers you can quickly have a wide variety in your layouts to support the wide range of android devices, without have to code a lot extra.
In my oppinion, that's the biggest advantage of using xml resources vs creating all layouts dynamically. For more info see this link about resources