public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Resource.Id.home:
{
var upIntent = NavUtils.GetParentActivityIntent(this);
if (NavUtils.ShouldUpRecreateTask(this, upIntent))
{
// This activity is NOT part of this app's task, so create a new task
// when navigating up, with a synthesized back stack.
Android.Support.V4.App.TaskStackBuilder.Create(this).
AddNextIntentWithParentStack(upIntent).StartActivities();
}
else
{
// This activity is part of this app's task, so simply
// navigate up to the logical parent activity.
NavUtils.NavigateUpTo(this, upIntent);
}
}
return true;
}
return base.OnOptionsItemSelected(item);
}
}