6

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..

Pragnesh Ghoda シ
  • 8,318
  • 3
  • 25
  • 40
parthi
  • 115
  • 1
  • 2
  • 8

1 Answers1

2

Instead of dip try with sp

Check this Answer for better understanding.

check the following 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">20sp</item>
    <item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
</style>

Code adopted from this link. Changing text Size of menu item in android

Community
  • 1
  • 1
SilentKiller
  • 6,944
  • 6
  • 40
  • 75