java - Android action bar not placing buttons linearly -
i have activity showing actionbar. have split mode enabled , on bottom bar showing 4 menu items. icons sized 32 dp. icons not horizontally aligned.
the first 2 buttons closer each other. third button takes half of action bar space , 4th button relatively on right.
on pressed 3rd button shows space taken more.
what behavior , how fix it?

provided images same width, have 2 options:
- use
weightsum,layout_weightset icons take equal amounts of spacing. manually set padding, so:
<style name="apptheme" parent="theme.sherlock"> <item name="actionbuttonstyle">@style/myactionbuttonstyle</item> <item name="android:actionbuttonstyle">@style/myactionbuttonstyle</item> </style> <style name="myactionbuttonstyle" parent="widget.sherlock.actionbutton"> <item name="android:minwidth">32dip</item> <item name="android:padding">0dip</item> </style>
Comments
Post a Comment