how to prevent system font-size changing effects to android application?

If you require your text to remain the same size, you’ll have to use dp.

To quote the documentation:

An sp is the same base unit, but is scaled by the user’s preferred text size (it’s a scale-independent pixel), so you should use this measurement unit when defining text size (but never for layout sizes).

Emphasis mine.

So you’re seeing the expected behaviour for using sp as your units for text size.

I don’t understand what you mean about using dp taking too long to maintain your app – as far as I can tell, it’ll exactly be the same amount of effort? (perhaps less, though it’ll likely make it less usable for users with poor eyesight)

Leave a Comment