Different font sizes in different layout variants?

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I have an app with 3 layouts: 800x480x240, 800x480x160, and 480x320x160. I resize Views to fit the different sizes and resolutions, but when I use Designer to change the font on a View, such as on a label or button, it changes it on ALL of the variants. The Views, themselves, remain the different sizes I've made them for different layouts, just the font sizes change.

The layout has over 40 labels and buttons, which is a lot to have to change programmatically to adjust for different device specs.

I thought that the point of Designer was to allow sizing things differently for different device specs. Am I missing something?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Layouts variants only differ in their views position and size.
In most cases you will want to have the same font size for all variants. Fonts are scaled automatically based on the current device scale.

Another possible approach is to load an existing layout, save it with a different name and then configure it as needed.
In your code check GetDeviceLayoutValues and choose the best layout file.
 
Upvote 0
Top