Layout Variant

Scantech

Well-Known Member
Licensed User
Longtime User
Hello,

How can it be done, so that I can support 320x480x160 and 480x800x160. From my understanding, Do I add a new variant. Then B4A should take care of the coding when compiled? Thanks You
 

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Yes. Add a new variant with the desired size. You will then need to reposition the views in the layout, increase the text size, etc. Android will automatically use the variant closest to the device being used.

If you haven't already looked at this page in the Wiki, you may want to give it a look. You can also find additional information in the Beginners Guide.
 
Last edited:
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Yes. Add a new variant with the desired size. You will then need to reposition the views in the layout, increase the text size, etc. Android will automatically use the variant closest to the device being used.

If you haven't already looked at this page in the Wiki, you may want to give it a look. You can also find additional information in the Beginners Guide.

The text size will scale automatically. if you change the text size of a view in one layout it affects ALL layouts.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
Another tip, something I overlooked the first couple times I played with it: when you do create new variants, be sure that you are using an emulator (or device) that exactly matches the variant specs. Otherwise you may think it looks right, that is until it is run on a device that really does match the variant specs.

Seems obvious, but at first I didn't fully understand the variant-emulator relationship.
 
Upvote 0
Top