0

I would like to change the position of the item in my action bar. I would like to have something like the theme used by samsung the figure below(https://i.stack.imgur.com/LCpkV.jpg). the menu item is given by the code below.

<menu xmlns:android="http://schemas.android.com/apk/res/android" >

      <item
        android:id="@+id/application"
        android:showAsAction="ifRoom|withText"
        android:title="@string/application"
        android:layout_gravity="left"
        android:visible="true"
        />
    <item
        android:id="@+id/documents"
        android:showAsAction="ifRoom|withText"
        android:title="@string/documents"
        android:layout_gravity="left"
        android:visible="true"
        />
    <item android:id="@+id/matiere"
         android:showAsAction="ifRoom|withText"
         android:title="@string/matiere"
         android:layout_gravity="left"
         android:visible="true"
        />

    <item
        android:id="@+id/bienvenue"
        android:icon="@drawable/eleve"
        android:showAsAction="ifRoom|withText"
        android:title="@string/student"
        android:visible="true"/>

    <item
        android:id="@+id/root_menu"
        android:icon="@drawable/fleche"
        android:showAsAction="always"
        android:title="@string/more">
        <menu>
            <item
                android:id="@+id/miShowAll"
                android:icon="@drawable/admin"
                android:showAsAction="never"
                android:title="@string/admin1"/>
            <item
                android:id="@+id/miShowLess"
                android:icon="@drawable/prof"
                android:title="@string/teacher"/>
            <item
                android:id="@+id/miShowProfil"
                android:icon="@drawable/eleve"
                android:title="@string/student"/>
            <item
                android:id="@+id/miShowAbout"
                android:title="@string/showAbout"/>

            <item
                android:id="@+id/miAdmin"
                android:title="@string/config"
                android:visible="false">
            </item>
        </menu>
    </item>

</menu>

Here is the image:

enter image description here

  • By position do you mean which one comes first and which one second...? – Shobhit Puri Jul 29 '13 at 15:39
  • As this question currently stands, it is unclear what the desired result is. Please describe (with pictures or a detailed verbal description) what you currently see and what you would like to see. – Bryan Herbst Jul 29 '13 at 15:39
  • I can't put a picture haven't sufficient reputation. it is the second menu bar with application and widget and in the other side the menu. I tried to use the gravity but it isn't the best way. – user2591941 Jul 29 '13 at 15:43
  • Load the picture in a host images services and post the link to see it – lory105 Jul 29 '13 at 15:46
  • A link to a picture hosted on another site (such as [imgur](http://imgur.com/)) would be sufficient. – Bryan Herbst Jul 29 '13 at 15:46

0 Answers0