Tuesday, September 13, 2011

[android-developers] Changing the "scaled pixel" size

In a number of places the documentation recommends specifying font sizes
in "sp" (scaled pixels) because the size can then be adjusted by "user
preference". However, AFAIK there is no global way to do this. So if I
want to allow users to increase or decrease the font size in my app, I
assume that I'll have to implement my own app-specific preference.

The problem is that I can't see how to change the setting.
DisplayMetrics has a "scaledDensity" field that is obviously the scaling
factor that affects font specified in "sp", but I don't see any way to
change that value. Am I missing something?

Doug Gordon
GHCS Software

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment