Hi,
I use the following to reverse big fonts of Android setting:
It works fine for Labels, but not for ListView. The ListView is not detected within the panel.
What is wrong with this? Can somebody help me?
BR, André
I use the following to reverse big fonts of Android setting:
B4X:
Public Sub ResetUserFontScale(p As Panel)
Dim Factor As Double
If(Starter.ScreenWidth>=1200) Then
Factor=1.1
Else
Factor=1
End If
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 * Factor) / Starter.access.GetUserFontScale
'Log("LBL is AANWEZIG")
Else If v Is Spinner Then
Dim s As Spinner = v
s.TextSize = (s.TextSize * Factor) / Starter.access.GetUserFontScale
'Log("SPIN is AANWEZIG")
Else If v Is ListView Then
Dim lv As ListView = v
lv.SingleLineLayout.Label.TextSize = (lv.SingleLineLayout.Label.TextSize * Factor) / Starter.Access.GetUserFontScale
lv.TwoLinesLayout.Label.TextSize = (lv.TwoLinesLayout.Label.TextSize * Factor) / Starter.Access.GetUserFontScale
lv.TwoLinesLayout.SecondLabel.TextSize = (lv.TwoLinesLayout.SecondLabel.TextSize * Factor) / Starter.Access.GetUserFontScale
lv.TwoLinesAndBitmap.Label.TextSize = (lv.TwoLinesAndBitmap.Label.TextSize * Factor) / Starter.Access.GetUserFontScale
lv.TwoLinesAndBitmap.SecondLabel.TextSize = (lv.TwoLinesAndBitmap.SecondLabel.TextSize * Factor) / Starter.Access.GetUserFontScale
Log("LV is AANWEZIG")
End If
Next
End Sub
It works fine for Labels, but not for ListView. The ListView is not detected within the panel.
What is wrong with this? Can somebody help me?
BR, André