Note that there are some explanatory texts on larger screens.

plurals
  1. POUp indicator does not show up
    primarykey
    data
    text
    <p>I'm currently trying to enable <a href="http://developer.android.com/guide/topics/ui/actionbar.html#Up" rel="nofollow noreferrer">up navigation</a> in my Android app. To do so, I followed the tutorial and implemented the necessary code into my activity:</p> <h2>SettingsActivity.java</h2> <pre><code>package de.ntraum.arcon; import android.content.Intent; import android.os.Bundle; import android.preference.PreferenceActivity; import android.view.MenuItem; public class SettingsActivity extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActionBar().setHomeButtonEnabled(true); addPreferencesFromResource(R.xml.settings); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: startActivity(new Intent(SettingsActivity.this, MainActivity.class) .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)); return true; default: return super.onOptionsItemSelected(item); } } } </code></pre> <p>If relevant, here's the <code>AndroidManifest.xml</code> and <code>styles.xml</code>:</p> <h2>AndroidManifest.xml</h2> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.ntraum.arcon" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" /&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Light" &gt; &lt;activity android:name=".MainActivity" android:label="@string/title_activity_main" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".SettingsActivity" android:exported="false" android:label="@string/title_activity_settings" &gt; &lt;intent-filter&gt; &lt;category android:name="android.intent.category.PREFERENCE" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <h2>styles.xml</h2> <pre><code>&lt;resources&gt; &lt;style name="Light" parent="android:Theme.Holo.Light.DarkActionBar" /&gt; &lt;style name="Dark" parent="android:Theme.Holo" /&gt; &lt;/resources&gt; </code></pre> <h2>Issue</h2> <p>The thing is, when accessing the activity, the up indicator in the action bar is missing. Nevertheless, the navigation is actually working (it takes me back to the <code>MainActivity.class</code>), it's just the small indicator that does not show up correctly.</p> <p><img src="https://i.stack.imgur.com/tMsY6.png" alt="Screenshot of Activity with missing up indic"></p> <p>I've tested it on my own device and in the emulator so far.</p>
    singulars
    1. This table or related slice is empty.
    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.
    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