[Just pour parle
. Note that here now is 3:40 AM ! So, I'm sleeping
].
I almost abandoned the idea of using only the Designer and its scripts.
So, I was developing a small project with the intention of use code later to scale the layout.
Just out of curiosity, I wanted to look at the effect of Designer' AutoScaleAll only, on two different devices.
I had not ever done!
Let's see if I can explain the facts.
I have created a Variant which has the size and the density of my smartphone. Then: (Landscape - Full Screen without Title): 800 x 480 - 1.5.
I have a Button; Height = 50 (dips in the Designer)
a) What should be its (new, scaled) height in a device (tablet) with: 1280 x 800 - 1 ?
Given that the result was not convincing, I have set the layout to 800 x 480 - 1, then I have changed only the Scale of the Variant.
b) What should be the scaled height now?
Finally, both 100%y and GetDeviceLayoutValues.Height returns 752, despite the full screen and no title, instead of 800.
So... Happy New Year

I almost abandoned the idea of using only the Designer and its scripts.
So, I was developing a small project with the intention of use code later to scale the layout.
Just out of curiosity, I wanted to look at the effect of Designer' AutoScaleAll only, on two different devices.
I had not ever done!
Let's see if I can explain the facts.
I have created a Variant which has the size and the density of my smartphone. Then: (Landscape - Full Screen without Title): 800 x 480 - 1.5.
I have a Button; Height = 50 (dips in the Designer)
a) What should be its (new, scaled) height in a device (tablet) with: 1280 x 800 - 1 ?
I think: if the Variant scale was 1, as the tablet, the Height should be: (800 / 480) x 50 = 83.
Considering the different density: (1 / 1.5) x 83 = 55.
Well, it is scaled to... 49!
Considering the different density: (1 / 1.5) x 83 = 55.
Well, it is scaled to... 49!
Given that the result was not convincing, I have set the layout to 800 x 480 - 1, then I have changed only the Scale of the Variant.
b) What should be the scaled height now?
Height should be: (800 / 480) x 50 = 83.
It is scaled to... 62!
It is scaled to... 62!
Finally, both 100%y and GetDeviceLayoutValues.Height returns 752, despite the full screen and no title, instead of 800.
So... Happy New Year
Last edited: