0

I want to show a item from left first. Like this

enter image description here

So, I tried this

<item android:id="@+id/refresh" 
    android:icon="@drawable/ic_action_refresh" 
    android:enabled="true" 
    android:orderInCategory="0"
    android:layout_gravity="left"
    app:showAsAction="always" 
    android:title="Refresh" 
    android:visible="true">
</item>

But, It show the item from right. How can I fix that ?

user2579475
  • 1,051
  • 3
  • 11
  • 20
  • Can you post the details of the layout this item is a child of? – Prmths Sep 12 '13 at 18:11
  • 1
    I don't think `android:layout_gravity` is a valid attribute for a menu item. – Vikram Sep 12 '13 at 18:13
  • The only way to accomplish that in an ActionBar is to use a custom view (and hide the icon etc.). Basically your menu items will become a bunch of, say, `ImageView`s that are styled like action items. [Example here](http://stackoverflow.com/a/17735176/1029225). – MH. Sep 12 '13 at 19:22

1 Answers1

0

I don't think that is possible. That place is reserved for the app icon and view control, the options menu come 3d in line, and they appear in the right side of the ActionBar.

Here's the general organization of the ActionBar: http://developer.android.com/design/patterns/actionbar.html#organization

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