Dear B4A team, I am very much comfortable with B4A programming except one thing, control placement. Even for the simplest example, view on mobile screen and view on designer is not similar. I have to put lots of efforts/trial and error to make sure view on mobile/tab screen is ok.
It should be simple to build the layout with the designer. Maybe you are confused because of the AutoScaleAll method in the designer script. Delete it.
When B4A was build, variant specific script was used. As B4A and Android evolved, they are no longer useful. Using anchors is best approach in new B4A.
Thanks Erel and Mr. Anand for your feedback. But how can we achieve below with anchors?
1) Anchors help to make the placement of controls w.r.t. left/top/right to Edge/bottom or all four sides. But when there is multiple columns and rows of Buttons then how to achieve placement correctly?
2) Anchors do not help to adjust control size in proportion.
3) With single variant, how to achieve both orientations?
+1
I too would be interested in seeing if/how this works across even a limited range of aspect ratios, with designer and autoscaling ie without coding/scripting.
Anchors help to make the placement of controls w.r.t. left/top/right to Edge/bottom or all four sides. But when there is multiple columns and rows of Buttons then how to achieve placement correctly?
I think Klaus has understood your problem and given idea of the solution too, by adding panel.
Did it solve your problem ?
If not, please upload image of what you can see and what you want to see.