Android Question Responsive

Hirogens

Active Member
Licensed User
Longtime User
Hello, I would like to know something. I follow the great tuto by Klaus about AutoScale. (Designer Scripts & AutoScale Tutorial)
But even with this tuto, I can't find the way to put a button at a place for an Android with large screen (5'5) and have the same place (at some pixels) on a 4' screen phone :/
Maybe someone can explain how I can do this because I would like to create my 1st real application full responsive =)

Edit: Maybe I search something like
B4X:
size_x
size_y

size_x = GetSizeX_mobile
size_y = GetSizeY_mobile

Button.SetTop = size_x / 0.50
Button.SetLeft = size_y / 0.25
B4X:
size_x
size_y

size_x = GetSizeX_mobile
size_y = GetSizeY_mobile

Button.SetTop = size_x / 0.50
Button.SetLeft = size_y / 0.25
And my button will take the place at 50% from the top of the screen and 25% from the left
 
Last edited:

Hirogens

Active Member
Licensed User
Longtime User
Hello, thank you for that I was thinking y was left-right and x top-bottom =)
I use emulator 6' and 4' to see if everything is good, but today I just saw on 4' it's perfect but when I try on 6' nothing good :/
Maybe I forget something, maybe it exist a tuto about how do that but I don't find it
Cordially
 
Upvote 0
Top