Scaling Android app with different screen sizes

So, I am working on scaling my application to different screen sizes. It is currently optimized for a 10.1-inch screen, but I'm working on launching it on the Kindle Fire, which has a 7-inch screen. I use only relative layouts. At the moment, my background scales perfectly, but the image buttons on the background table do not scale, and I was wondering if there was a reason for this. I also use margins to adjust the positions of my buttons, is this normal for scaling sizes?

+4
source share
2 answers

You should always define in your manifest, because the default values ​​can change from one version to another.

But if you want to support xlarge screens, you are stuck because this attribute was introduced in the API level 9 (android 2.3). You must create two different APKs, one for Android versions> = 2.3, and the other for older ones.

Since this is a common problem, android provides a good way to publish only one application on the market, even if you use multiple APKs.

+3
source

to support the application on another screen, see the following link

http://developer.android.com/guide/practices/screens_support.html

and to scale the image button, use nine patch images that scale well.

I also use fields to adjust the positions of my buttons, is this normal for scaling sizes?

Yes, everything is in order.

+5
source

Source: https://habr.com/ru/post/1397713/


All Articles