1

I am using the ActionBar Compatibility, everything is OK, except the fact that by default, the buttons (actions) have some padding around.

How can I alter that padding for specific buttons, remove it, and in some cases adjust. enter image description here

David Wasser
  • 93,459
  • 16
  • 209
  • 274
Andy Res
  • 15,963
  • 5
  • 60
  • 96
  • How are you adding the buttons. In the past in order to change attributes within (essentially) a menu with custom buttons, spacing etc... I have had to build my own menu. Some good links are here at the following StackOverflow question. http://stackoverflow.com/questions/1593529/android-customize-applications-menu-e-g-background-color – trumpetlicks Jun 08 '12 at 17:16
  • The buttons are inflated from a menu.xml resource, just like any other regular options menu. Thanks for the link. – Andy Res Jun 09 '12 at 09:09
  • I have read the examples. Well, with the options menu it seems to be more easier to adapt, than with ActionBar, my case. – Andy Res Jun 09 '12 at 09:20
  • do you have your menu.xml code? – trumpetlicks Jun 09 '12 at 12:45

1 Answers1

0

I managed to resolve this issue by creating a custom layout and attaching it to the ActionBar, by configuring the styles:

<style name="ActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
   <item name="android:displayOptions">showHome|useLogo|showCustom</item>
   <item name="android:customNavigationLayout">@layout/actionbar_custom_title</item>
</style>

Now there appeared another problem: Please see this thread if you can help me: Android - Remove "More actions" button from the ActionBar

Community
  • 1
  • 1
Andy Res
  • 15,963
  • 5
  • 60
  • 96