当前位置: 首页>>代码示例>>C#>>正文


C# Bundle.PutBundle方法代码示例

本文整理汇总了C#中Bundle.PutBundle方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.PutBundle方法的具体用法?C# Bundle.PutBundle怎么用?C# Bundle.PutBundle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bundle的用法示例。


在下文中一共展示了Bundle.PutBundle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnSaveInstanceState

 public override void OnSaveInstanceState(Bundle outState)
 {
     var focusedChild = quizView.FocusedChild;
     var viewGroup = focusedChild as ViewGroup;
     if (viewGroup != null) {
         var currentView = viewGroup.GetChildAt (0);
         var qView = currentView as AbsQuizView;
         if (qView != null)
             outState.PutBundle (KeyUserInput, qView.UserInput);
     }
     base.OnSaveInstanceState (outState);
 }
开发者ID:CHANDAN145,项目名称:monodroid-samples,代码行数:12,代码来源:QuizFragment.cs

示例2: CreateFragmentTypesDictionary

        private Dictionary<string, Type> CreateFragmentTypesDictionary(Bundle outState)
        {
            IMvxSavedStateConverter savedStateConverter;
            if (!Mvx.TryResolve(out savedStateConverter))
            {
                return null;
            }

            var typesForKeys = new Dictionary<string, Type>();

            var currentFragsInfo = GetCurrentCacheableFragmentsInfo();
            foreach (var info in currentFragsInfo)
            {
                var fragment = info.CachedFragment as IMvxFragmentView;
                if (fragment == null)
                    continue;

                var mvxBundle = fragment.CreateSaveStateBundle();
                var bundle = new Bundle();
                savedStateConverter.Write(bundle, mvxBundle);
                outState.PutBundle(info.Tag, bundle);

                if(!typesForKeys.ContainsKey(info.Tag))
                    typesForKeys.Add(info.Tag, info.ViewModelType);
            }

            return typesForKeys;
        }
开发者ID:Ideine,项目名称:MvvmCross-AndroidSupport,代码行数:28,代码来源:MvxCachingFragmentActivity.cs

示例3: OnSaveInstanceState

		protected override void OnSaveInstanceState (Bundle outState)
		{
			//Store the game state
			outState.PutBundle (ICICLE_KEY, snake_view.SaveState ());
		}
开发者ID:89sos98,项目名称:monodroid-samples,代码行数:5,代码来源:SnakeActivity.cs

示例4: OnSaveInstanceState

 public override void OnSaveInstanceState(Bundle outState)
 {
     base.OnSaveInstanceState(outState);
     WizardFlow.PersistFlow(outState);
     outState.PutBundle(STATE_WIZARD_CONTEXT, StateManager.ContextBundle);
 }
开发者ID:cryptocoinx,项目名称:WizarDroid.Net,代码行数:6,代码来源:WizardFragment.cs

示例5: OnSaveInstanceState

		public override void OnSaveInstanceState (Bundle outState)
		{
			base.OnSaveInstanceState (outState);

			PreferenceScreen preferenceScreen = PreferenceScreen;
			if (preferenceScreen != null) {
				Bundle container = new Bundle ();
				preferenceScreen.SaveHierarchyState (container);
				outState.PutBundle (PREFERENCES_TAG, container);
			}
		}
开发者ID:DuckArne,项目名称:CSharp.SupportPreferencefragment,代码行数:11,代码来源:SupportPreferenceFragment.cs


注:本文中的Bundle.PutBundle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。