Android Question Fit label textsize with devices

Pooya1

Active Member
Licensed User
I add label with 14 textsize in designer for 5 inch device
Now when app launch in tablet,though i use autoscaleall but textsize is small still
What strategy i use for response layout?
 

Widget

Well-Known Member
Licensed User
Longtime User
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Here is something that I have used in the past. It may help or lead to some ideas.

I create a dummy reference label that has its Visible property set to False.

I leave the text size of this label set to the default text size – it seems that this default text size is adjusted along with AutoScaleAll per the device.

Then if I modify the text size of any visible labels, I modify the size as a percentage of the text size of this reference label – maybe 80% (0.80 x reference label text size) or 120% (1.20 x reference label text size)

This seemed to perform well for the phones and tablets I have tested on.

Barry.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
AutoScaleAll resizes all the views, positions, dimensions and text sizes.
AutoScaleRate is a ponderation factor btween 0 to 1.
AutoScaleRate(0) does nothing and AutoScaleRate(1) is near %x and %y values.
You may have a look at chapter 8.12 AutoScale in the B4A Brinner's Guide, link in my signature.
 
Upvote 0

Pooya1

Active Member
Licensed User
AutoScaleAll resizes all the views, positions, dimensions and text sizes.
AutoScaleRate is a ponderation factor btween 0 to 1.
AutoScaleRate(0) does nothing and AutoScaleRate(1) is near %x and %y values.
You may have a look at chapter 8.12 AutoScale in the B4A Brinner's Guide, link in my signature.
Thanks
 
Upvote 0
Top