Reputation: 1511
Does anyone know what is the default size of the TitleBar
and TitleBarText
in android?
Upvotes: 4
Views: 4708
Reputation: 133560
You can find the default height here
The below is for 4.0.3
<dimen name="action_bar_default_height">48dip</dimen>
<dimen name="action_bar_title_text_size">18dp</dimen>
Check the dimens.xml under respective res/values folder
To the comments from Gopal Rao
<style name="TextAppearance">
<item name="android:textColor">?textColorPrimary</item>
<item name="android:textColorHighlight">?textColorHighlight</item>
<item name="android:textColorHint">?textColorHint</item>
<item name="android:textColorLink">?textColorLink</item>
<item name="android:textSize">16sp</item> // its is in sp not dp
<item name="android:textStyle">normal</item>
</style>
http://developer.android.com/guide/practices/screens_support.html
If you look at the topic best practices.
Quoting "you should prefer the sp (scale-independent pixel) to define text sizes. The sp scale factor depends on a user setting and the system scales the size the same as it does for dp".
Upvotes: 3