本文整理汇总了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);
}
示例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;
}
示例3: OnSaveInstanceState
protected override void OnSaveInstanceState (Bundle outState)
{
//Store the game state
outState.PutBundle (ICICLE_KEY, snake_view.SaveState ());
}
示例4: OnSaveInstanceState
public override void OnSaveInstanceState(Bundle outState)
{
base.OnSaveInstanceState(outState);
WizardFlow.PersistFlow(outState);
outState.PutBundle(STATE_WIZARD_CONTEXT, StateManager.ContextBundle);
}
示例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);
}
}