From f4c128e030628bbb8782f95b2235ed25250d47e7 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Tue, 16 Dec 2014 09:07:52 +0100 Subject: [PATCH] Add a comment. --- app/src/main/java/com/murrayc/galaxyzoo/app/BaseActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/murrayc/galaxyzoo/app/BaseActivity.java b/app/src/main/java/com/murrayc/galaxyzoo/app/BaseActivity.java index a9204ad8..553fc9e1 100644 --- a/app/src/main/java/com/murrayc/galaxyzoo/app/BaseActivity.java +++ b/app/src/main/java/com/murrayc/galaxyzoo/app/BaseActivity.java @@ -94,6 +94,9 @@ public boolean onOptionsItemSelected(MenuItem item) { final int id = item.getItemId(); if (id == android.R.id.home) { + //We can use this instead of more complex code, checking NavUtils.shouldUpRecreateTask(), + //because we know that our activities will never be opened from another app. + //See http://developer.android.com/training/implementing-navigation/ancestral.html. NavUtils.navigateUpFromSameTask(this); return true; }