本文整理汇总了C#中Bundle.GetIntArray方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.GetIntArray方法的具体用法?C# Bundle.GetIntArray怎么用?C# Bundle.GetIntArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle.GetIntArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreateActivity
protected override void OnCreateActivity (Bundle bundle)
{
base.OnCreateActivity (bundle);
SetContentView (Resource.Layout.MainDrawerActivity);
DrawerListView = FindViewById<ListView> (Resource.Id.DrawerListView);
DrawerListView.Adapter = drawerAdapter = new DrawerListAdapter ();
DrawerListView.ItemClick += OnDrawerListViewItemClick;
DrawerLayout = FindViewById<DrawerLayout> (Resource.Id.DrawerLayout);
DrawerToggle = new ActionBarDrawerToggle (this, DrawerLayout, Resource.Drawable.IcDrawer, Resource.String.EntryName, Resource.String.EntryName);
DrawerLayout.SetDrawerShadow (Resource.Drawable.drawershadow, (int)GravityFlags.Start);
DrawerLayout.SetDrawerListener (DrawerToggle);
Timer.OnCreate (this);
var lp = new ActionBar.LayoutParams (ActionBar.LayoutParams.WrapContent, ActionBar.LayoutParams.WrapContent);
lp.Gravity = GravityFlags.Right | GravityFlags.CenterVertical;
ActionBar.SetCustomView (Timer.Root, lp);
ActionBar.SetDisplayShowCustomEnabled (true);
ActionBar.SetDisplayHomeAsUpEnabled (true);
ActionBar.SetHomeButtonEnabled (true);
if (bundle == null) {
OpenPage (DrawerListAdapter.TimerPageId);
} else {
// Restore page stack
pageStack.Clear ();
var arr = bundle.GetIntArray (PageStackExtra);
if (arr != null) {
pageStack.AddRange (arr);
}
}
}
示例2: RestoreState
// Restore game state if our process is being relaunched
public void RestoreState(Bundle icicle)
{
SetMode (GameMode.Paused);
apples = Coordinate.ArrayToList (icicle.GetIntArray ("mAppleList"));
mDirection = (Direction)icicle.GetInt ("mDirection");
mNextDirection = (Direction)icicle.GetInt ("mNextDirection");
mMoveDelay = icicle.GetInt ("mMoveDelay");
mScore = icicle.GetLong ("mScore");
snake_trail = Coordinate.ArrayToList (icicle.GetIntArray ("mSnakeTrail"));
}
示例3: OnCreateActivity
protected override void OnCreateActivity (Bundle state)
{
base.OnCreateActivity (state);
SetContentView (Resource.Layout.MainDrawerActivity);
MainToolbar = FindViewById<Toolbar> (Resource.Id.MainToolbar);
DrawerListView = FindViewById<ListView> (Resource.Id.DrawerListView);
DrawerUserView = LayoutInflater.Inflate (Resource.Layout.MainDrawerListHeader, null);
DrawerUserName = DrawerUserView.FindViewById<TextView> (Resource.Id.TitleTextView);
DrawerImage = DrawerUserView.FindViewById<ProfileImageView> (Resource.Id.IconProfileImageView);
DrawerListView.AddHeaderView (DrawerUserView);
DrawerListView.Adapter = drawerAdapter = new DrawerListAdapter ();
DrawerListView.ItemClick += OnDrawerListViewItemClick;
var authManager = ServiceContainer.Resolve<AuthManager> ();
authManager.PropertyChanged += OnUserChangedEvent;
DrawerLayout = FindViewById<DrawerLayout> (Resource.Id.DrawerLayout);
DrawerToggle = new ActionBarDrawerToggle (this, DrawerLayout, MainToolbar, Resource.String.EntryName, Resource.String.EntryName);
DrawerLayout.SetDrawerShadow (Resource.Drawable.drawershadow, (int)GravityFlags.Start);
DrawerLayout.SetDrawerListener (DrawerToggle);
Timer.OnCreate (this);
var lp = new Android.Support.V7.App.ActionBar.LayoutParams (ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent, (int)GravityFlags.Right);
MainToolbar.SetNavigationIcon (Resource.Drawable.ic_menu_black_24dp);
SetSupportActionBar (MainToolbar);
SupportActionBar.SetTitle (Resource.String.MainDrawerTimer);
SupportActionBar.SetCustomView (Timer.Root, lp);
SupportActionBar.SetDisplayShowCustomEnabled (true);
var bus = ServiceContainer.Resolve<MessageBus> ();
drawerSyncStarted = bus.Subscribe<SyncStartedMessage> (SyncStarted);
drawerSyncFinished = bus.Subscribe<SyncFinishedMessage> (SyncFinished);
DrawerSyncView = FindViewById<FrameLayout> (Resource.Id.DrawerSyncStatus);
syncRetryButton = DrawerSyncView.FindViewById<ImageButton> (Resource.Id.SyncRetryButton);
syncRetryButton.Click += OnSyncRetryClick;
syncStatusText = DrawerSyncView.FindViewById<TextView> (Resource.Id.SyncStatusText);
if (state == null) {
OpenPage (DrawerListAdapter.TimerPageId);
} else {
// Restore page stack
pageStack.Clear ();
var arr = state.GetIntArray (PageStackExtra);
if (arr != null) {
pageStack.AddRange (arr);
}
}
// Make sure that the user will see newest data when they start the activity
ServiceContainer.Resolve<ISyncManager> ().Run ();
}
示例4: OnRestoreInstanceState
protected override void OnRestoreInstanceState(Bundle savedInstanceState)
{
base.OnRestoreInstanceState(savedInstanceState);
if(savedInstanceState != null)
{
_passcodeEntered = savedInstanceState.GetIntArray(KEY_PASSCODE_ENTERED);
_numbersEntered = savedInstanceState.GetInt(KEY_PASSCODE_COUNT);
UpdateFilledCircles();
}
}
示例5: RestoreState
public void RestoreState(Bundle icicle)
{
SetMode (GameMode.Paused);
apples = Coordenadas.ArrayToList (icicle.GetIntArray ("mCheeseList"));
mDireccion = (Direccion)icicle.GetInt ("mDireccion");
mSig_Direccion = (Direccion)icicle.GetInt ("mSig_Direccion");
mMoveDelay = icicle.GetInt ("mMoveDelay");
mPuntos = icicle.GetLong ("mPuntos");
snake_campo = Coordenadas.ArrayToList (icicle.GetIntArray ("mSnakeTrail"));
}
示例6: OnCreateActivity
protected override void OnCreateActivity (Bundle state)
{
base.OnCreateActivity (state);
SetContentView (Resource.Layout.MainDrawerActivity);
MainToolbar = FindViewById<Toolbar> (Resource.Id.MainToolbar);
DrawerListView = FindViewById<ListView> (Resource.Id.DrawerListView);
DrawerUserView = LayoutInflater.Inflate (Resource.Layout.MainDrawerListHeader, null);
DrawerUserName = DrawerUserView.FindViewById<TextView> (Resource.Id.TitleTextView);
DrawerEmail = DrawerUserView.FindViewById<TextView> (Resource.Id.EmailTextView);
DrawerImage = DrawerUserView.FindViewById<ProfileImageView> (Resource.Id.IconProfileImageView);
if (!ServiceContainer.Resolve<AuthManager>().OfflineMode) {
DrawerListView.AddHeaderView (DrawerUserView);
}
DrawerListView.Adapter = drawerAdapter = new DrawerListAdapter ();
DrawerListView.ItemClick += OnDrawerListViewItemClick;
authManager = ServiceContainer.Resolve<AuthManager> ();
authManager.PropertyChanged += OnUserChangedEvent;
DrawerLayout = FindViewById<DrawerLayout> (Resource.Id.DrawerLayout);
DrawerToggle = new ActionBarDrawerToggle (this, DrawerLayout, MainToolbar, Resource.String.EntryName, Resource.String.EntryName);
DrawerLayout.SetDrawerShadow (Resource.Drawable.drawershadow, (int)GravityFlags.Start);
DrawerLayout.SetDrawerListener (DrawerToggle);
var drawerFrameLayout = FindViewById<FrameLayout> (Resource.Id.DrawerFrameLayout);
drawerFrameLayout.Touch += (sender, e) => {
// Do nothing, just absorb the event
// TODO: Improve this dirty solution?
};
Timer.OnCreate (this);
var lp = new Android.Support.V7.App.ActionBar.LayoutParams (ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent, (int)GravityFlags.Right);
MainToolbar.SetNavigationIcon (Resource.Drawable.ic_menu_black_24dp);
SetSupportActionBar (MainToolbar);
SupportActionBar.SetTitle (Resource.String.MainDrawerTimer);
SupportActionBar.SetCustomView (Timer.Root, lp);
SupportActionBar.SetDisplayShowCustomEnabled (true);
if (state == null) {
OpenPage (DrawerListAdapter.TimerPageId);
} else {
// Restore page stack
pageStack.Clear ();
var arr = state.GetIntArray (PageStackExtra);
if (arr != null) {
pageStack.AddRange (arr);
}
}
// Make sure that the user will see newest data when they start the activity
ServiceContainer.Resolve<ISyncManager> ().Run ();
}