Layout suggestions

wl

Well-Known Member
Licensed User
Longtime User
Hello,

I'm starting on my first B4A project.

After having read the "getting started" PDF file it still remains a bit unclear to me on how to deal with different screen resolutions: how to center controls ? What is the impact of the LCD density ? ...

Is there any document or post that could clarify these issues ?

Thanks !
 
Last edited:

wl

Well-Known Member
Licensed User
Longtime User
Thanks !!!

To be more specific: it is the example on p.72-73 of the PDF that is unclear to me.

UPDATE:
could it be there is an error on p.72 ? The H/W ratio of 240/320 (first resolution) should be 4/3 and the one of 320/480 should be 3/2...
It seems both ratio's have been switched ? With this correction the example becomes clear ...


Also: it seems as if the layout should scale automatically (in width) ? On a quick test I did it did not seem to scale at all.

Thanks !!
 
Last edited:
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
What is exactly you are not getting?, also, can you post your test code? that way a better explanation could be done.

:sign0098: Hi NJDude,

Thanks for your concern !
I was just experimenting with the layout/designer... I guess I was confused because of the error in the manual...

Still not sure where the density comes into place ...

thanks again !!
 
Upvote 0

parijs

Active Member
Licensed User
Longtime User
I think he's right.

Msgbox(LayoutVal ,"this is LayoutVal ?") gif me
480x800 scale = 1,5 (240 dpi)


but go to the 480 x 320 scale = 1 (160dpi).bal
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
I think he's right.

Msgbox(LayoutVal ,"this is LayoutVal ?") gif me
480x800 scale = 1,5 (240 dpi)


but go to the 480 x 320 scale = 1 (160dpi).bal

Hi Parijs,

Who's right with what ?

Thanks !
 
Upvote 0

parijs

Active Member
Licensed User
Longtime User
If my phone say he is 480x800 scale = 1,5 (240 dpi)

And the choice is 480 x 320 scale = 1 (160dpi).bal is not wrong?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
UPDATE:
could it be there is an error on p.72 ? The H/W ratio of 240/320 (first resolution) should be 4/3 and the one of 320/480 should be 3/2...
It seems both ratio's have been switched ? With this correction the example becomes clear ...
Yes, you are right, the ratios are wrong.
Woll be fixed in the next update.
Thank you for reporting it and Best regards.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Yes, you are right, the ratios are wrong.
Woll be fixed in the next update.
Thank you for reporting it and Best regards.

Hi Klaus, you're welcome. (I also found a few typo's, but this error was a bit confusing).

You did a great job in writing the PDF !

Thanks,

PS: might be useful to add some extra chapters on libraries (eg: the C2DM library - which is of great interest to me
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…