本文整理匯總了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();
}