如何调整在Android上的操作栏菜单文字大小 [英] How resize the Action Bar Menu Text Size in Android
本文介绍了如何调整在Android上的操作栏菜单文字大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发Android应用。有一个关于减少文字大小动作栏菜单项疑问。这是我的code。
<样式名称=MyActionBar.MenuTextStyle父=机器人:款式/ TextAppearance.Holo.Widget.ActionBar.Menu>
<项目名称=机器人:文字颜色>#888888< /项目> <! -
<项目名称=机器人:TEXTSTYLE>大胆< /项目> - >
<项目名称=机器人:TEXTSIZE> 10dip< /项目>
<项目名称=机器人:textAppearance> @android:款式/ TextAppearance.Medium< /项目>
< /风格>
在此先感谢。
解决方案
而不是浸
尝试与 SP
<的/ P>
检查这个答案更深入的了解。
检查以下code:
&LT;样式名称=AppTheme父=AppBaseTheme&GT;
&LT;项目名称=机器人:TEXTSIZE&GT; 20SP&LT; /项目&GT;
&LT; /风格&GT;
从这个链接通过code。 更改菜单项的文本大小的机器人
I am developing the android application. have one doubt regarding reduce the text size for action bar menu item. this my code.
<style name="MyActionBar.MenuTextStyle" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Menu">
<item name="android:textColor">#888888</item> <!--
<item name="android:textStyle">bold</item> -->
<item name="android:textSize">10dip</item>
<item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
</style>
Thanks in advance..
解决方案
Instead of dip
try with sp
Check this Answer for better understanding.
check the following code :
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:textSize">20sp</item>
</style>
Code adopted from this link. Changing text Size of menu item in android
这篇关于如何调整在Android上的操作栏菜单文字大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文