Android Question Designer - unresolved


Licensed User
I created my layout with an old version of B4A NOT using the standard 320x480-1 but a variant suitable for my device: 480x800-1.5.

Now that I have the 3.00, when I load these layouts, the designer scripts (current variant: 480 x 800, scale = 1.5) shows the view laid out properly, but if I use AutoScaleAll and press F5, they increase their vertical dimension. Same situation during the execution of the app.

How so? How can I fix?


Well-Known Member
Licensed User
I have ever done any sizes of layout without autoscaleall command by thinking the size of layout which you selected is100%,and thinking each views is how many % of the views' positions.
Upvote 0


Licensed User
AutoScaleAll scales the layout based on the "standard" size which is 320x480-1. You shouldn't use AutoScaleAll with other variants.

I know that i don't need to AutoScale using only "my" variant, i'm not so stupid (i hope) :)

My question was "why that strange behaviour and why NOW, without using AutoScale, my old layouts are streched, at the same values!

But may be i have the answer.

because now my device displays some more pixels on top, having changed API version...???

Last observation:
I load the project, open the designer and connect my smartphone to the designer. Immediately, without AutoScale or F5, the Abstract Designer displays views correctly but on smartphone they are streched !
Upvote 0


Licensed User
Actually there is no connection between the number of variants and AutoScaleAll.

AutoScaleAll scales the chosen variant based on the device actual size. I recommend you to start with a single standard variant and use the designer script to make your layout flexible.

I'm doing other tests.

At this time, I created a new project:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15"/>
(my devices: S.O. 4.0.4 - 480x800 1.5 - scales [ 240 ] ).

1) I created a layout for the Main, using the standard ( 320x480 -1);
2) uploaded a second layout from my old app that I built with variant 480x800 -1.5.
(I had the terror of use F5 and compare the Abstact designer with my device connected , so I did not ).


a) Using AutoScaleAll in the script of each layout:
Main layout: it becomes about 90% of the display (I see a black stripe high 10% at the bottom)
Second layout: it becomes about 103% of the screen (just like in Abstact Designer)

b) Using Scale.Initialize + Scale.ScaleAll (Klaus) in the Main layout and Scale.SetReferenceLayout (480 , 800, 1.5) + Scale.ScaleAll in the OLD layout everything seems ok.

But I have not yet tried on emulators with different resolutions, for the moment

I 'll try again, then, to incorporate Scale.SetReferenceLayout (480 , 800, 1.5) in all the activities of my old project (I already done two days ago, but did not give the expected around results and I think that was so because NOW the title of the activity is lowest and without an icon!)

I'm afraid I'll have to redo my whole project again

Best regards

P.S. I have tested (b) with 3 emulators:

320x480 160
480x800 240
240x432 120

The proportions are respected in all 3 cases.

Only a few pictures does not have a beautiful appearance. Starting from the standard (320 ...) what might be the ideal size of an image for a larger home button to put on (in my app, not the device)?

I am using LoadBitmap for the ImageView, then resize with Scale.ScaleAll.

Could you suggest to me about the ideal source size of the images? (grr my english, sorry!)
Should I use "InitializeSample" instead?

Again, they are already good enough.

Thanks again
Last edited:
Upvote 0


Licensed User
I finally found what was my graphic trouble:

the IME library!

Klaus, if I put:

IME1.Initialize ("IME1")


Scale.SetReferenceLayout (480, 800, 1.5)
Scale.ScaleAll (Activity, True)

the proportions are not maintained.

There is also a (more little) problem with the default keyboard, without using the library IME.

Upvote 0


Licensed User
I don't use the IME library.
So I have never test it with the Scale module.

Even using the default keyboard (but in this case, there are no errors in the proportions):

I placed an EditText to the bottom of the panel (its height is equal to activity.height):
the keyboard scrolls well only from the second "getFocus"... i can't explain it better :(
Upvote 0