public void SelectedItemChanged(int position, string label) { switch (label) { case "Home": { var calcFrag = new CalcFragment(); var transaction = SupportFragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.fragment_container, calcFrag, CalcFragTag); transaction.Commit(); SlidingMenu.ShowContent(); } break; case "Help": { Toast.MakeText(this.SupportActionBar.ThemedContext, "help clicked", ToastLength.Short).Show(); } break; case "About": { var aFrag = new AboutFragment(); var transaction = SupportFragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.fragment_container, aFrag); transaction.Commit(); SlidingMenu.ShowContent(); } break; default: throw new InvalidOperationException(); } }
public void SelectedItemChanged(int position, string label) { switch (label) { case "Home": { var calcFrag = new CalcFragment(); var transaction = SupportFragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.fragment_container, calcFrag, CalcFragTag); transaction.Commit(); SlidingMenu.ShowContent(); } break; case "Help": { Toast.MakeText(this.SupportActionBar.ThemedContext, "help clicked", ToastLength.Short).Show(); } break; case "About": { var aFrag = new AboutFragment(); var transaction = SupportFragmentManager.BeginTransaction(); transaction.Replace(Resource.Id.fragment_container, aFrag); transaction.Commit(); SlidingMenu.ShowContent(); } break; default: throw new InvalidOperationException(); } }