Android Question AutoScale

AHilberink

Active Member
Licensed User
Longtime User
Hi,

I made a layout based on 800x1280 Scale 1. I want to show it on a 600x1200 device, so I enable AutoScaleAll. The layout is resizing a bit, but not enough.

Is there a way to resize an existing layout to be correctly based on the resolution of the device?
AutoScaleRate(x,x) seems not working anymore (I supposed this could be a solution).

Best regards,
André
 

AHilberink

Active Member
Licensed User
Longtime User
You should work on a 320x430 scale 1, that will fit on any screen.

Do I have to make every view/field as small for fitting on 320x480 (lot of fields and they become very small) or do you mean I can work outside the dimension and the AutoScallAll will work correctly?

Best regards,
André
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
The AutoScale function has changed since B4A version 3.20.
It supports now other screens than the standard one.
What AutoScaleRate did you use.
For downscaling you shoud use an AutoScaleRate equal or near to 1.
You might have a problem with the two screen resolutions you are speaking of due to the much bigger width/height ratio for the 600x1200 screen 1x2 against 1x1.6. The Anchor function will be helpful.
Are you sure that it's 600x1200, it's the first time I see a width/height ratio of 1x2 ?
With AutoScale the scaling would be too streched in one direction but not enough in the other.

You may have a look at following chapters in the Beginner's Guide.
8.9 Designer Scripts
8.10 Anchors
8.11 AutoScale
8.12 UI Cloud

You could also have a look at the AutoScale Code Module.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…