Android Question How to use scale with small screens

antonomase

Active Member
Licensed User
Hi,

I have developped my application for a layout 360x640 scale 1. For my tests on my Galaxy S3 (720x1280 scale 2) the views on the screen are at the right place.

One user tells me about problems with its Huawei Y300 480x800 and I have reproduced this bug on AVD with the 4.0" WVGA Generic emulator.

All the labels on the screen change position and size
e.g. One label is set with the designer at left: 290 top :50 width: 70 height: 80
when I log its position and size when the app stars, it becomes
left: 435 top: 75 width: 105 height: 120
and 435+75 = 510 is greater than the screen width (480)

I detect that LayoutValues return a scale 1.5.

How to use this scale to put views at right place and with the right size ?

Thanks
 

lemonisdead

Well-Known Member
Licensed User
Hello,

I am sorry but I can only advice you to read Klaus excellent Beginners guide or you won't be able to understand the layouts. And Erel's tips and best practice for multi screens : https://www.b4x.com/android/forum/threads/17647

Really it is not for not providing a reply but that's a big point to understand. And if you are in a hurry you can create another variant for your other layout but not the solution
 
Top