This commit is contained in:
aminecmi 2015-07-16 09:55:20 +02:00
parent ee03c91cb9
commit 84a4ad3bfe

View File

@ -15,6 +15,7 @@ public class DetailsActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_details); setContentView(R.layout.activity_details);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} }
@ -36,6 +37,10 @@ public class DetailsActivity extends AppCompatActivity {
if (id == R.id.action_settings) { if (id == R.id.action_settings) {
return true; return true;
} }
if (id == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }