Note that there are some explanatory texts on larger screens.

plurals
  1. POFill Action bar SHerlock with items
    primarykey
    data
    text
    <p>I am implementing ActionBarSherlock. I have disabled icon and title. But still my items are not taking that space. I have used</p> <pre><code> getSupportActionBar().setDisplayShowTitleEnabled(false); getSupportActionBar().setDisplayShowHomeEnabled(false); getSupportActionBar().setDisplayHomeAsUpEnabled(false); </code></pre> <p>Icon and title are disappeared. But that space is not filled up with my items. I have 5 items like</p> <pre><code> &lt;item android:id="@+id/Clear" android:title="Clear" android:showAsAction="ifRoom"&gt;&lt;/item&gt; &lt;item android:id="@+id/load" android:title="Load" android:showAsAction="ifRoom"&gt;&lt;/item&gt; &lt;item android:id="@+id/Undo" android:title="Undo" android:showAsAction="ifRoom"&gt;&lt;/item&gt; &lt;item android:id="@+id/save" android:title="Save" android:showAsAction="ifRoom"&gt;&lt;/item&gt; &lt;item android:id="@+id/settings" android:title="Settings" android:showAsAction="ifRoom"&gt;&lt;/item&gt; </code></pre> <p>But only 3 of them are being shown. and action bar is not full. It's like</p> <p><img src="https://i.stack.imgur.com/O9ELa.png" alt="enter image description here"></p> <p>I want all the items to appear in the action bar. what should I do?</p> <p>EDIT:</p> <p>I am considering adding tabs to the bar. It gives Run time error. Here is my code for adding tabs (It should be pretty simple but I don't know what am i doing wrong here)</p> <pre><code>Tab tab = getSupportActionBar().newTab(); protected void onCreate(Bundle savedInstanceState) { getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); for (int i = 1; i &lt;= 3; i++) { tab.setText("Tab " + i); getSupportActionBar().addTab(tab); } } </code></pre> <p>I think this code should be enough to add tabs to the bar. isn't it?</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