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


C# Bundle.GetIntArray方法代码示例

本文整理汇总了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);
                }
            }
        }
开发者ID:nagyist,项目名称:toggl-mobile,代码行数:36,代码来源:MainDrawerActivity.cs

示例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"));
        }
开发者ID:4ndr01d,项目名称:monodroid-samples,代码行数:12,代码来源:SnakeView.cs

示例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 ();
        }
开发者ID:ZhangLeiCharles,项目名称:mobile,代码行数:59,代码来源:MainDrawerActivity.cs

示例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();
     }
 }
开发者ID:edub9,项目名称:XamarinPasscode,代码行数:10,代码来源:PasscodeActivity.cs

示例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"));
        }
开发者ID:Hackemate,项目名称:Snake,代码行数:11,代码来源:GameView.cs

示例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 ();
        }
开发者ID:eatskolnikov,项目名称:mobile,代码行数:57,代码来源:MainDrawerActivity.cs


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