Android Question how make text size proportional at dimension of view?

luciano deri

Active Member
Licensed User
Longtime User
Icons is usefull if is possile use it without load an image in a statelist drawable button. So it need a fill gravity propety or some similar option.
 
Upvote 0

luciano deri

Active Member
Licensed User
Longtime User
B4X:
If Portrait Then
   label.TextSize = 10 + 1 * ((100%y / 480) * (100%y / 480)  * (100%y /480))
Else  
    label.TextSize = 10 + 1 * ((100%y / 320) * (100%y / 320)  * (100%y /320))
End If
This is a teory, to do a matematical solution in a script for made scaled textsize
With a smaller device 320*480 textsize is 11
Increment at esponential 3 the index to add at 10 every display more big
 
Upvote 0
Top