Hi guys,
I'd like to know why on some devices the autoscale of txtbox is ok (ex s3 and s4) but on phones of my parents (note II and Vodafone cell) resolution of txtbox is not ok.
I'll attach 2 same screenshots (first ok on my s3 and second not ok on note 2)
naturally relatives to 1 posto.
See both pictures and notate differences.
Tks everybody.
If you like watching my app is avaible on google play store as name of "Storic Memory Game arma carabinieri" and download it.
tks for helping
Sub LargeTextSet As Boolean
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod("getResources")
r.Target = r.RunMethod("getConfiguration")
Dim Sc As Float = r.GetField("fontScale")
Return (Sc > 1)
End Sub
This should work (wow, my first code with reflection, if I remember correctly!).
So if the function returns True you will have to adapt the font size.
You can't change a default font size. You can define a theme, and define a font size in your theme. You can read about defining themes and styles in the android developer reference documentation.
----
You can change font size, style etc in your application, but not for whole device. To do that i guess you need to root your phone and provide custom fonts with specified font size in it.
Però potrei mettere un avviso iniziale dove avviso l'utente di controllare il settaggio della grandezza del carattere o è esteticamente brutto a vedersi?
-------------------------------------
Can I put an advise at start where I indicate to the user to control the font size of default device or is a bad thing to do?