Sub Activity_Create(FirstTime As Boolean)
...
SetActivityFont(Activity)
...
End Sub
Sub getScale As Float
Dim access As Accessiblity
Return access.GetUserFontScale
End Sub
'User-Schriftgröße auf Normal zurücksetzten.
Sub SetActivityFont(act As Activity)
Dim fscale As Float = getScale
For Each v As View In act.GetAllViewsRecursive
If fscale <> 1 Then
ChangeFontsize(v, fscale)
End If
Next
End Sub
Private Sub ChangeFontsize(v As View, fscale As Float)
If v Is Label Then
Dim lbl As Label = v
lbl.TextSize = NumberFormat2(lbl.TextSize / fscale,1,0,0,False)
Else If v Is Button Then
Dim s As Button = v
s.TextSize = NumberFormat2(s.TextSize / fscale,1,0,0,False)
End If
End Sub