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..
setTextSize(18); actionbar. setDisplayOptions(ActionBar. DISPLAY_SHOW_CUSTOM); actionbar. setCustomView(textview);
We can see that we are able to fetch the ActionBar height, which is equal to 147 Pixels.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With