Does the documentation ( or anyone) talks about the dpi values of the default
- Large TextView {
android:textAppearance="?android:attr/textAppearanceLarge"
} - Medium TextView {
android:textAppearance="?android:attr/textAppearanceMedium"
} - Small TextView {
android:textAppearance="?android:attr/textAppearanceSmall"
}
widgets in the SDK ?
To put it in another way, can we replicate the appearance of these text views without using the android:textAppearance
attribute?
Like biegleux already said:
If you want to use the small, medium or large value on any text in your Android app, you can just create a
dimens.xml
file in yourvalues
folder and define the text size there with the following 3 lines:Here is an example for a TextView with large text from the
dimens.xml
file:Programmatically, you could use:
See in the android sdk directory.
In
\platforms\android-X\data\res\values\themes.xml
:In
\platforms\android-X\data\res\values\styles.xml
:TextAppearance.Large
means style is inheriting fromTextAppearance
style, you have to trace it also if you want to see full definition of a style.Link: http://developer.android.com/design/style/typography.html