Well, in most cases, you will have layouts that become or become complex, and it will be difficult to program positions.
And this will also be a disadvantage supporting it, because you cannot use the interface material (graphic layout, etc.), and other people or by themselves will not understand the calculations in the same way as if they see representations in XML. Reorganization, change of place can be painful.
You will also often work with bitmaps that have a fixed size, if you calculate the sizes programmatically and stretch, they will not look good. At the very least, you will need a different set of bitmaps and loading accordingly.
This helps if, for example, you use relative layouts with rules (for example, above / align at the bottom of the parent, etc.), linear layouts with weights and dip (pixels independent of density). You should only make a software layout when it is not possible in a different way. Or in some specific cases when it really really makes the process easier.
source share