Listview - scaling of text-labels

moster67

Expert
Licensed User
Longtime User
I don't think that with the designer-script and its AutoScaleAll, I am able to adjust automatically the text-sizes of a ListView (please correct me if I am wrong).

Based upon above assumption, I am wondering if anyone has written a routine or some general code how to handle the text-size automatically of a ListView. Normally I get it right for phones but on tablets very often, the text-size of the labels in the ListView are too small and they simply look horrible.

If you have a handy routine and you want to share, then it would be highly appreciated.
 

moster67

Expert
Licensed User
Longtime User
Nice idea Erel. I will try that.

Could this work as well?

B4X:
delta = ((100%x + 100%y) / (320dip + 480dip) - 1)
rate = 0.2 'value between 0 to 1. 
scale = 1 + rate * delta

lv.SingleLineLayout.Label.TextSize = lv.SingleLineLayout.Label.TextSize * scale

If yes, what would be the best datatypes for delta, rate and scale?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I don't think that with the designer-script and its AutoScaleAll, I am able to adjust automatically the text-sizes of a ListView (please correct me if I am wrong).

Based upon above assumption, I am wondering if anyone has written a routine or some general code how to handle the text-size automatically of a ListView. Normally I get it right for phones but on tablets very often, the text-size of the labels in the ListView are too small and they simply look horrible.

If you have a handy routine and you want to share, then it would be highly appreciated.
Have a look here AutoScale Code Module.

Best regards.
 
Upvote 0
Top