This is the same app, on 2 different devices. The layout seems to scale just fine, but the font size does not. I have no clue what could be the cause or where to start looking. The first is on a Pixel 2 and looks normal, the second is on a Galaxy A7 2018 and the text is off scale.
-
My assumption is that Galaxy S7 has the "elderly mode" enabled - all text is enlarged on the device by default. Do you think that's the case?Egor– Egor2019-06-08 16:14:02 +00:00Commented Jun 8, 2019 at 16:14
-
@George I thought so too, gonna take a look in the settings, but I see it happening on a few devices, and I don't think it is because of that setting. Seems like the whole UI is just scaled too big somehowJovanovski– Jovanovski2019-06-08 17:17:38 +00:00Commented Jun 8, 2019 at 17:17
-
@George Indeed I was wrong, it is exactly that option!Jovanovski– Jovanovski2019-06-08 17:27:53 +00:00Commented Jun 8, 2019 at 17:27
-
Haha well, I actually encountered similar behavior when I borrowed a phone to test my app on. Apparently, people with farsightedness use that setting to read text easier. You might want to consider adjusting your UI for that group of people, since accessibility does matter.Egor– Egor2019-06-08 17:34:44 +00:00Commented Jun 8, 2019 at 17:34
Add a comment
|
1 Answer
George in the comments was right, it was an option in android to scale fonts that caused this effect. I had to use the code (from here) below to set the app-wide textScaleFactor back to 1.0.
MaterialApp(
builder: (context, child) {
return MediaQuery(
child: child,
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
);
},
)

