Error with font sizes. Different behaviors between Android 7.1.1 and Android 11

Hi koders!
I’m having an strange error and I hope you can help me with it.
If a user set the device with a big font, some screens of the app doesn’t appear good, so I made some blocks to fit the font size of the labels and buttons, to mantain the original aspect, like I saw in this post:

The main block is this one, with all the labels and buttons of the app that caused problems with the font size.

The first one is for some buttons that are generated dinamically.
I tested the app in two devices and everything was ok (one has Android 7.1.1 and the other is Android 6.0), so I uploaded it to the Play Store. The test was made with the apk file.
But when I have upgraded the app from the Play Store in another device (this one is Android 11) it shows this message just at the beggining (the procedure “TextSize” is in the initialize screen block):
When tested with Companion this error doesn’t appear. When installed the apk in the device with Android 11, the error appears too. I uninstalled and installed again in the Android 11 device and the error keeps appearing.
When installed from the Play Store in the device with Android 7.1.1 the error doesn’t appear!
I don’t have more devices to try.
What can be wrong?
The app is this:
Thanks in advance!
EDIT: Tested in a tablet with Android 10, installing from Play Store and everythig ia fine, no error.

Maybe it has to do with the declaration of permissions on android 11

image taken from PuraVida Apps

Maybe @Taifun could help you


Thanks Dora, sure this is the problem.
I’ll try to declare this permission and see what happens. I know there are some changes with the write/read permission in external storage in Android 11 but its quite a mess for me.
Thanks again!

1 Like

Finally I find the problem; I was changing the font size to a list view before the list view was generated, so this was generating the error.
Why it doesn’t show the error in the old versions of Android? Because the list view is generated with the subscription mode, and the only device with the subscription active was the one with Android 11.

It’s good you found the solution. Thanks for sharing it with everyone.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.