AutoScale doubts

gjoisa

Active Member
Licensed User
Longtime User
As Erel said :
The recommended way to adjust your UI is:
1. AutoScaleAll
2. Adjust the views location as required
3. Use SetLeftAndRight and SetTopAndBottom on the views that should fill the available space)
My doubt is , all these 3 things are necessary or If I write AutoScaleAll in my designer script , it is enough . If there is a complete example for this , will help us more .
 

lagore

Active Member
Licensed User
Longtime User
My experience so far with the new designer script has been very good. I went from having a designer script with almost 100 lines of code to get the layout just right to 2 lines, I placed these in the 'variant specific script'
B4X:
AutoScaleRate(0.5)
AutoScaleAll
I have a HTC One X which works out at 360 x 640 scale = 1 and I just have to change the AutoScaleRate to get it to fill the screen correctly. With a different phone/screensize/scale the process is very simple, add a new variant then modify the AutoScaleRate to suit. Obviously if you needed to fix a view to an edge or to a width then that would be included in the 'All variants script' but only needs a line to 2. A very powerful and helpful feature.
 
Upvote 0

lagore

Active Member
Licensed User
Longtime User
AutoScaleRate(0.5) was what I needed to use for my particular phone you will have to experiment a bit.
 
Upvote 0

junaidahmed

Well-Known Member
Licensed User
Longtime User
Regarding Autoscale feature,I have one more doubts,Can I autoscale from high resolution (1280 X 800 scale = 1) to (low resolution 480 X 320 scale = 1).pls advise
 
Upvote 0

lagore

Active Member
Licensed User
Longtime User
I think the way Erel has setup the AutoScale feature is that it has to go from the base phone (320 x 480 or 480 x 320 both scale = 1) up to the new variant also at scale = 1.
 
Upvote 0

junaidahmed

Well-Known Member
Licensed User
Longtime User
ok i understood the Erel concept,but currently i am developing for samsung galaxy Tab 8.9 with resolution 1280 X 800 and scale = 1 ,i would like to replace the same layout (with autoscale feature) for samsung Galaxy Note 5.3 with resolution 1280 X 800 and scale = 2.pls advise

Eagerly awaiting for your reply
 
Upvote 0

junaidahmed

Well-Known Member
Licensed User
Longtime User
Thank you very much Erel,I have designed a layout in 480 X 320 and set autoscale feature,now I can run my application on all devices,so my problem has solved after a long time back.

sorry for my bad english
 
Upvote 0
Top