donald draper
donald draper

Reputation: 571

android - prevent text size change on device text size

I set font size 14sp for my textview in android , the problem is , when I change my phone text size , in the application it changes the size either , How can I prevent this ? How can I force text view to use the defined text size ?

Upvotes: 1

Views: 3391

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317760

When you declare a font with a size measured in sp ("scaled pixels") that measurement is supposed to be affected by the device font settings. That's fully expected.

If you want a font size that never changes with the font settings, use dp measurements instead.

Upvotes: 5

Related Questions