I'm using SlidingMenu and 3/4 navigation is done by it. And if I want to go back I have to went through all these activities which I open before. I would like to change it to such that closing any child activity (not a main activity) sends me to app main activity, and if then I press back it exit app. Simple as that.
I open new activities that way:
Intent LinieActivity = new Intent(Oznaczenia.this, Linie.class);
startActivity(LinieActivity);
and I have tried putting in my Manifest such thing:
<activity
android:name=".childActivity"
android:label="some name">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.MainActivity" />
</activity>