I have an activity up-navigation enabled, so I have the android:parentActivityName set. This works.
However, I want my AppPreferencesActivity to be accessed from different parent activities. I'd like to have my up-action return to the activity that launched it. Removing the parentActivityName attribute removes the up action completely.
How can I configure the application so that Up Navigation returns me to the activity that launched my AppPreferencesActivity?
<activity
android:name="org.me.AppPreferencesActivity"
android:label="@string/title_activity_preferences"
android:parentActivityName="org.me.MainActivity">
</activity>
First, I removed the parentActivityNameAttribute.
Then, in my AppPrefernecesActivity, I added this to the creation portion:
THen, defined a case for handling the "home" action.
This works, but is there a better way? This seems a bit hackish.