Spinner TextSize property shown with a wrong size

klaus

Expert
Licensed User
Longtime User
Sorry, wrong analysis it has nothing to do with the layout files.

Further investigations show that:
- the Spinner.TextSize property is divided by the scale.
- multiplying it even with a value of one divides it once again by the scale.
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("main")
    Spinner1.Add("Text size = 16")
    Spinner2.Add("Text size = 16")
    Log(Spinner1.TextSize)
    Spinner1.TextSize = Spinner1.TextSize * 1
    Log(Spinner1.TextSize)
End Sub
The original TextSize is 16
On a device with a scale of 1.5
The first Log shows 10.6666 (16/1.5)
The second Log shows 7.11 (16/1.5/1.5)

Attached the small test project showing the problem.

Best regards.
 

Attachments

  • SpinnerTextSize.zip
    6.9 KB · Views: 223
Top