Android Question [Solved] Override user's custom fontsize settings

Lori Scott

Member
Licensed User
My Android app uses designer script to adjust the size and position of each control. The AutoScaleAll is left on (not commented out). In use, the app looks like this:
SGApp Screenshot_20181113-092224.jpg

On a different, larger device used by my colleague, it looks very similar. However, another colleague using the same larger device as the first colleague, but who has customized his device to use larger fonts, sees this view of the app, with the text truncated due to larger fontsize.
SGApp Screenshot_20181107-143546.jpg

Is there a way I can override the custom fontsize settings in a user's device so that the font will fit properly within my app?
 

Attachments

Lori Scott

Member
Licensed User
Thank you, Erel. I reset my device to display larger font and tested the project with the font scaling code incorporated. What I've observed is that when I first open the app, the font sizes are large and truncated within the controls. But if I release focus of the app (without closing it) and then retrieve focus on the app, then all the fonts are re-scaled as desired.

I believe that because I am using a splash screen, it was contributing the effect described above. After I added the ResetUserFontScale(Activity) statement into the TimerSplash_End sub (as well as the keeping it in the Activity_Create sub where I already had it), I now get the desired font re-scaling in both the initial focus and when I refocus.
 
Last edited:

Lori Scott

Member
Licensed User
Is there a similar process needed and/or available in B4i when I convert this Android App to an iOS app?
 
Top