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?

enter image description here

provided images same width, have 2 options:

  1. use weightsum , layout_weight set icons take equal amounts of spacing.
  2. 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

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -