Fixing the font size of Android (The user changed the font size through setting in OS, but ignores that part and fixes the font size)

Asked 2 years ago, Updated 2 years ago, 18 views

Hello.

When TextSize is 13sp via XML,

The size looks the same on a normal cell phone.

On the Android OS platform, users will be able to change the font size to [Large, Very Large] instead of [Ordinary]

If you set it up, the size of the entire text in the app gets bigger.

Is there a way that the font size of the app is always fixed even if the user changes the font size?

Thank you for taking the time to look at the questions.

android

2022-09-21 19:21

1 Answers

If you set the font size to sp, it will be affected by the font size of the device setting as you mentioned. If you don't want to be affected by the device settings, change it to 13dp instead of 13sp.


2022-09-21 19:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.