Android Question Designer - Autoscale and screen density

LucaMs

Expert
Licensed User
Takes into account Autoscale the density of the device screen?

upload_2015-7-4_14-12-29.png


a resized screenshot on the left, designer on the right.

The proportions are not respected: depends it on the density difference?
 

LucaMs

Expert
Licensed User
If you use the designer right it should independent from density.
Did you use anchors, designer scripts, dip, %x/%y? It's hard to say without knowing your layout.
After that test, I changed the layout, so it is not useful if I post it now.

I used nothing, just a general script to center the panel in the layout.

Anchors have default values.
 

LucaMs

Expert
Licensed User
upload_2015-7-4_15-16-19.png


Attached the layout

ehm... I forgot to change the text of the label after duplication of the view, but the screenshot is relative to that layout
 

Attachments

Last edited:

MaFu

Well-Known Member
Licensed User
The size and position values in the view properties on designer would be interpreted as dip. Therefore the size of your views have always (almost) the same (physical) size, doesn't matter which size or density your device have. A button with a size value of 50dip for example is shown with a size of 9 millimeters (more or less). Why should your dialog been bigger on a tablet as on a 4.5 inch phone?
 

LucaMs

Expert
Licensed User
Why should your dialog been bigger on a tablet as on a 4.5 inch phone?
It is exactly what I would not; it must not be bigger, it must be proportionate.

Here the difference is even more striking:

upload_2015-7-4_16-10-59.png


In the Designer, the panel is almost as big as the layout, in the screenshot the panel is... as you can see!
 

Attachments

LucaMs

Expert
Licensed User
The size and position values in the view properties on designer would be interpreted as dip. Therefore the size of your views have always (almost) the same (physical) size, doesn't matter which size or density your device have.
This is the problem. If Autoscale took into account the density of the screen that displays the layout, the views would be proportionate.
 

MaFu

Well-Known Member
Licensed User
Sorry, i can't see any problem. If this is not what you want, how should the panel look in your case?
If your panel should have a specific size, use dip and forget the layout size in the designer (sorry for the bug in my last post, 50dip isn't 9 millimeter, it's 7,9 millimeter).
If your panel should suit to the display, use %x/%y and/or anchors.
Or you can mix, you have all possibilities.
 

LucaMs

Expert
Licensed User
If this is not what you want, how should the panel look in your case?
I would like some sort of WYSIWYG; therefore, in this case, I would that the distances of the sides of the panel from the sides of the layout were proportionate. Can you get this with Autoscale and Anchors (and with more than one panel)? No. You can with percentages; this is the reason of this my "Wish".
 
Top