Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Action Bar not showing on displayOptions - useLogo
    text
    copied!<p>I have an <code>actionBarStyle</code> that I have implemented in my app for my <code>ActionBar</code>. Here is the xml code below:</p> <pre><code>&lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;style name="MyActionBarTheme" parent="@android:style/Theme.Holo"&gt; &lt;item name="android:windowActionBarOverlay"&gt;true&lt;/item&gt; &lt;item name="android:actionBarStyle"&gt;@style/MyCustomActionBar&lt;/item&gt; &lt;/style&gt; &lt;style name="MyCustomActionBar" parent="@android:style/Widget.Holo.ActionBar"&gt; &lt;item name="android:background"&gt;@android:color/transparent&lt;/item&gt; &lt;item name="android:backgroundSplit"&gt;@android:color/transparent&lt;/item&gt; &lt;item name="android:displayOptions"&gt;useLogo&lt;/item&gt; &lt;/style&gt; </code></pre> <p></p> <p>And here is my <code>Activity OnCreate</code>:</p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActionBar().setLogo(R.drawable.ic_logo); setContentView(R.layout.activity_home); initializeViews(); manageFragments(); } </code></pre> <p>The Problem is that my <code>ActionBar</code> doesn't show at all and when I remove the <code>displayOptions</code> item from My XML. It shows with the title. Now I can always remove the title (set the title string to just blank) but I don't want that as it shows the default <code>ActionBar</code> style/theme for a few seconds and then my custom theme (I guess you know this one). I don't know what the problem is. Please help. Thanks... </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