本文整理汇总了C#中Android.BeginTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# Android.BeginTransaction方法的具体用法?C# Android.BeginTransaction怎么用?C# Android.BeginTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android
的用法示例。
在下文中一共展示了Android.BeginTransaction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReloadCurrentFragment
public static void ReloadCurrentFragment(Android.Support.V4.App.FragmentManager fragmentManager)
{
Android.Support.V4.App.Fragment currentFragment = GetCurrentFragment(fragmentManager);
if(null == currentFragment) {
return;
}
Logger.Debug("Reloading current fragment...");
Android.Support.V4.App.FragmentTransaction fragmentTransaction = fragmentManager.BeginTransaction();
fragmentTransaction.Detach(currentFragment);
fragmentTransaction.Attach(currentFragment);
fragmentTransaction.Commit();
}
示例2: GoToGuestProfile
public static void GoToGuestProfile (Android.Support.V4.App.FragmentManager fragmentManager, int containerId, User user)
{
if (user.IsMe())
{
return;
}
ProfileFragment fragment = new ProfileFragment();
fragment.Guest = user;
fragmentManager.BeginTransaction().Add(containerId, fragment).AddToBackStack(null).Commit();
}
示例3: GoToSinglePost
public static void GoToSinglePost(Android.Support.V4.App.FragmentManager fragmentManager, int containerId, Post post){
SinglePostFragment fragment = new SinglePostFragment();
fragment.post = post;
fragment.containerId = containerId;
fragmentManager.BeginTransaction().Add(containerId, fragment).AddToBackStack(null).CommitAllowingStateLoss();
}
示例4: GoToListOf
public static void GoToListOf (Android.Support.V4.App.FragmentManager fragmentManager, int containerId, int objectid, FeedTypeEnum.FeedType target)
{
ListOfFragment fragment = new ListOfFragment();
fragment.objectid = objectid;
fragment.Target = target;
fragmentManager.BeginTransaction().Add(containerId, fragment).AddToBackStack(null).Commit();
}