Voglio allineare un elemento a sinistra del ActionBar e gli altri a destra in questo modo:Allineare una voce a sinistra di ActionBar
Ho 5 oggetti nel mio menù xml.
main.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="fr.mgs.consulting.allbrary_android.MainActivity" >
<item
android:id="@+id/action_spinner"
android:showAsAction="always"
android:actionLayout="@layout/spinner_actionbar"
android:title="@string/action_spinner"
android:orderInCategory="1"/>
<item
android:id="@+id/action_search"
android:showAsAction="always"
android:title="@string/action_spinner"
android:icon="@drawable/ic_action_search"
android:orderInCategory="2"/>
<item
android:id="@+id/action_tablet"
android:showAsAction="never"
android:title="@string/action_spinner"
android:icon="@drawable/ic_action_tablet"
android:orderInCategory="3"/>
<item
android:id="@+id/action_notifications"
android:showAsAction="always"
android:title="@string/action_spinner"
android:icon="@drawable/ic_action_notifications"
android:orderInCategory="4"/>
<item
android:id="@+id/action_user"
android:showAsAction="always"
android:title="@string/action_spinner"
android:icon="@drawable/ic_action_user"
android:orderInCategory="5"/>
Come possiamo farlo? Ci scusiamo per il mio pessimo inglese.
avere fortuna con questo? – ihsan