Why should we use xml layouts?

Creating the UI in that way and taking care of screen aspect ratio
ensures the app will look proportionally exactly the same in all
devices.

This is the way Apple does it, and this why when you open a folder on a 9.7 inch iPad with beautiful retina display, it only displays 9 icons.

A tablet is not just a bigger phone. It’s really not. Also, iOS devices have mostly the same aspect ratio, so that’s how they took care of the aspect ratio.

On Android however, you can’t just say that you “took care of the aspect ratio” problem and that this problem magically goes away. Your best bet is to use Android best practices to handle aspect ratios correctly.

That being said, don’t over do it either. You don’t need to use all 8 density buckets for instance. Look at the official dashboard to see what devices people are actually using, before you try to optimize for every scenario possible.

Also, you don’t have to listen to Google all the time. For instance, I am sure that Google would love that you translate your application so that it’s available in more then 68+ different languages worldwide, but what’s good for Google is not necessarily good for you. Android actually lets you choose the tools you want to use to make your application. They don’t force you to use any particular one.

Leave a Comment