Actually, Settings font size affects only sizes in sp. So all You need to do – define textSize in dp instead of sp, then settings won’t change text size in Your app.
Here’s a link to the documentation: Dimensions
However please note that the expected behavior is that the fonts in all apps respect the user’s preferences. There are many reasons a user might want to adjust the font sizes and some of them might even be medical – visually impaired users. Using dp instead of sp for text might lead to unwillingly discriminating against some of your app’s users.
i.e:
android_textSize=”32dp”
The easiest to do so is simply to use something like the following:
android_textSize=”32sp”
If you’d like to know more about the textSize property, you can check the Android developer documentation.