public void SetFlagDisplay(int tabIndex) { Fragment fragment = null; switch (tabIndex) { case 0: fragment = ItemOneFragment.NewInstance(chatService); break; case 1: fragment = ItemTwoFragment.NewInstance(chatService); break; case 2: fragment = ItemThreeFragment.NewInstance(chatService); break; case 3: fragment = ItemFourFragment.NewInstance(chatService); break; case 4: fragment = ItemFiveFragment.NewInstance(chatService); break; } navigation.Menu.GetItem(tabIndex).SetChecked(true); if (fragment != null) { FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, fragment) .Commit(); } }
public static ItemFiveFragment NewInstance(BluetoothChatService bcs) { ItemFiveFragment fragment = new ItemFiveFragment(bcs); return(fragment); }