Android Question Confused about AutoScale(All) - How to use?

doncx

Active Member
Licensed User
Longtime User
I developed an app specifically for the Nexus 10 a couple of years ago (2560x1600 resolution). Now the client wants to run it on Nexus 9 (2048x1536 resolution).

The app is over-sized on the smaller Nexus 9 and also doesn't rotate properly.

The original screens in designer are made to a custom size: 752x1280 and 1280x752.

I've tried AutoScaleAll and several AutoScaleRates (from 0.1 to 1) in the All Variants script. They all seem to be ignored and the Nexus 9 screen is still over-sized and won't rotate. I should say, it rotates but does not select the proper variant.

What do I need to do to make it work properly? I'm using B4A 4.30.

My thanks for your advice
 

doncx

Active Member
Licensed User
Longtime User
"2560x1600 resolution" in Android is meaningless without the scale.

You need to use anchors and designer script to implement a flexible layout.

I do use anchors and in some cases script to center and give widths.

Are you saying that every dimension of every view must be scripted?

Images attached.
 

Attachments

  • CFRFdesigner.jpg
    CFRFdesigner.jpg
    67.8 KB · Views: 475
  • CFRFdesignerscript.jpg
    CFRFdesignerscript.jpg
    100.5 KB · Views: 547
Upvote 0

doncx

Active Member
Licensed User
Longtime User
Thanks, Erel. I followed your advice and it was good, of course. I do have several very tightly laid out, button-filled screens and found that specifying top,left, width, and height in percentages for each and every view was the best way to preserve these. Otherwise, going small and counting on AutoScale was indeed very effective.
 
Upvote 0
Top