Hi,
I have tried the below code and it works fine with Samsung S5 even if I increase the font size on the phone. But when I am testing the same in Samsung S6 & S7 it is not working. The text on the buttons are not scaled correctly.
Please anyone help me out.
I have tried the below code and it works fine with Samsung S5 even if I increase the font size on the phone. But when I am testing the same in Samsung S6 & S7 it is not working. The text on the buttons are not scaled correctly.
Please anyone help me out.
B4X:
Sub Process_Globals
Dim access As Accessiblity
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
ResetUserFontScale(Activity)
End Sub
Sub ResetUserFontScale(p As Panel)
For Each v As View In p
If v Is Panel Then
ResetUserFontScale(v)
Else If v Is Label Then
Dim lbl As Label = v
lbl.TextSize = lbl.TextSize / access.GetUserFontScale
Else If v Is Spinner Then
Dim s As Spinner = v
s.TextSize = s.TextSize / access.GetUserFontScale
End If
Next
End Sub