Note that there are some explanatory texts on larger screens.

plurals
  1. POHave the split ActionBar display twice as many icons
    primarykey
    data
    text
    <p>I'd like to have an app layout as the one they used for Gmail. They have the actionbar that has icons (on my device it has the app logo for up navigation, and a custom view for selecting priority inbox/inbox/etc), but there is also some kind of split <code>ActionBar</code> because at the bottom I have several icons (compose, search, labels, etc).</p> <p>How could I do this? I have implemented the following <code>ActionBar</code> through this XML:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;item android:id="@+id/menu_gps" android:icon="@drawable/icone_gps_continu" android:showAsAction="always" android:title="@string/menu_gps"/&gt; &lt;item android:id="@+id/menu_sort" android:icon="@drawable/icone_liste_chron" android:showAsAction="always" android:title="@string/menu_liste"/&gt; &lt;item android:id="@+id/menu_stats" android:icon="@drawable/icone_statistiques" android:showAsAction="always" android:title="@string/menu_stats"/&gt; &lt;item android:id="@+id/menu_save" android:icon="@drawable/icone_terminersortie" android:showAsAction="always" android:title="@string/menu_save"/&gt; &lt;item android:id="@+id/menu_search" android:icon="@drawable/ic_launcher" android:showAsAction="always" android:title="@string/menu_search"/&gt; &lt;item android:id="@+id/menu_photo" android:icon="@drawable/icone_enregistrerphoto" android:showAsAction="always" android:title="@string/menu_photo"&gt; &lt;/item&gt; &lt;item android:id="@+id/menu_sound" android:icon="@drawable/icone_enregistrerson" android:showAsAction="always" android:title="@string/menu_sound"&gt; &lt;/item&gt; &lt;item android:id="@+id/menu_settings" android:icon="@drawable/icone_parametres" android:showAsAction="always" android:title="@string/menu_settings"&gt; &lt;/item&gt; &lt;/menu&gt; </code></pre> <p>And I have of course enabled the split <code>ActionBar</code> by adding <code>android:uiOptions="splitActionBarWhenNarrow"</code> to my <code>&lt;application&gt;</code> tag in the manifest.</p> <p>What I get though is an empty "top" <code>ActionBar</code>; and the bottom one is displaying only three icons. I thought I could display like 3-4 icons at the top and 5 at the bottom in portait mode, and all of them at the top in landscape mode.</p> <p>Note: even if I'm testing on ICS with my Galaxy Nexus, I'm using ActionBarSherlock in order to provide backward compatibility.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload