有谁知道 android 中 TitleBar
和 TitleBarText
的默认大小是多少?
最佳答案
您可以在此处找到默认高度
下面是4.0.3
<dimen name="action_bar_default_height">48dip</dimen>
<dimen name="action_bar_title_text_size">18dp</dimen>
查看各自res/values文件夹下的dimens.xml
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
如果您查看主题最佳实践。
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".
关于android - 标题栏的默认高度和标题栏中的默认文本大小是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21251777/