Note that there are some explanatory texts on larger screens.

plurals
  1. POActionBarSherlock + split action bar menu + items with "withText" doesn't show text. How to fix?
    text
    copied!<p>I'm using ActionBarSherlock and I'm trying to add an options menu to the ActionBar.</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_prev" android:title="@string/menu_previous" android:icon="@drawable/left_navigation" android:showAsAction="always|withText" /&gt; &lt;item android:id="@+id/menu_next" android:title="@string/menu_next" android:icon="@drawable/right_navigation" android:showAsAction="always|withText" /&gt; &lt;/menu&gt; </code></pre> <p>The icons are 32x32 pixels in the drawable-mdpi directory. When the ActionBar is split (portrait orientation), the icons show up but no text shows (plenty of room though). Long-pressing the icon Toasts the title. When the ActionBar is not split (landscape orientation), both the icons AND text show up as expected.</p> <pre><code>@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getSupportMenuInflater(); inflater.inflate(R.menu.main_menu, menu); return super.onCreateOptionsMenu(menu); } </code></pre> <p>Menu, MenuInflater, and getSupportMenuInflater() are all using the ActionBarSherlock implementations.</p> <p>The 'Application' in the manifest declares:</p> <pre><code>android:uiOptions="splitActionBarWhenNarrow" </code></pre> <p>What can I do to make it show the title of each item when in portrait orientation?</p> <p>Edit: Possibly relevant is that I'm running Android 4.0.4.</p>
 

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