private void TaskList_ItemSelected(object sender, ItemListSelectEventArgs e) { TodoItem item = e.Item as TodoItem; var f = new TaskFragment(); f.Arguments = new Bundle(); f.Arguments.PutObject("Item", item); this.FragmentManager.BeginTransaction() .AddToBackStack("BeforeTaskFragment") .Replace(Resource.Id.ContentLayout, f, "TaskFragment") .Commit(); }
public override bool OnOptionsItemSelected(IMenuItem item) { switch (item.ItemId) { case Android.Resource.Id.Home: QuitAgenda(); return(true); case 1: var f = new TaskFragment(); f.Arguments = new Bundle(); f.Arguments.PutInt("UserId", _userId); this.FragmentManager.BeginTransaction() .AddToBackStack("BeforeTaskFragment") .Replace(Resource.Id.ContentLayout, f, "TaskFragment") .Commit(); return(true); default: return(base.OnOptionsItemSelected(item));; } }