Up Indicator Does Not Show Up
I'm currently trying to enable up navigation in my Android app. To do so, I followed the tutorial and implemented the necessary code into my activity: SettingsActivity.java package
Solution 1:
The docs say to call setDisplayHomeAsUpEnabled(true) on your action bar. You're actually calling a different method, setHomeButtonEnabled
, so try adding the call from the docs.
Solution 2:
You can also set up the navigation "UP" functionality using XML in your AndroidManifest.xml instead of coding it programmatically. Very helpful to do it in one place if you have multiple activities all having UP navigation functionality.
<activityandroid:name=".SettingsActivity"android:exported="false"android:label="@string/title_activity_settings"android:parentActivityName=".MainActivity" ><!-- Parent activity meta-data to support 4.0 and lower --><meta-dataandroid:name="android.support.PARENT_ACTIVITY"android:value=".MainActivity" /><intent-filter><categoryandroid:name="android.intent.category.PREFERENCE" /></intent-filter></activity>
Post a Comment for "Up Indicator Does Not Show Up"