本文整理匯總了C#中Android.Replace方法的典型用法代碼示例。如果您正苦於以下問題:C# Android.Replace方法的具體用法?C# Android.Replace怎麽用?C# Android.Replace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Android
的用法示例。
在下文中一共展示了Android.Replace方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnTabSelected
public void OnTabSelected(ActionBar.Tab tab, Android.Support.V4.App.FragmentTransaction ft)
{
switch (tab.Text)
{
case "ListView":
ft.Replace(Android.Resource.Id.Content, new ListViewFragment());
break;
case "RecyclerView":
ft.Replace(Android.Resource.Id.Content, new RecyclerViewFragment());
break;
case "ScrollView":
ft.Replace(Android.Resource.Id.Content, new ScrollViewFragment());
break;
}
}
示例2: Transition
public static void Transition(Activity activity, Android.Support.V4.App.FragmentTransaction fragmentTransaction, int frameResId, Android.Support.V4.App.Fragment fragment)
{
InitTransaction(fragmentTransaction);
fragmentTransaction.Replace(frameResId, fragment);
fragmentTransaction.Commit();
}
示例3: StackTransition
public static void StackTransition(Activity activity, Android.Support.V4.App.FragmentTransaction fragmentTransaction, int frameResId, Android.Support.V4.App.Fragment fragment, string tags)
{
InitTransaction(fragmentTransaction);
fragmentTransaction.Replace(frameResId, fragment);
fragmentTransaction.AddToBackStack(tags);
fragmentTransaction.Commit();
}