コード例 #1
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                if (slidingPaneLayout != null)
                {
                    if (slidingPaneLayout.IsOpen)
                    {
                        slidingPaneLayout.ClosePane();
                    }
                    else
                    {
                        slidingPaneLayout.OpenPane();
                    }
                }
                break;

            case Resource.Id.refresh:
                inbox.SetListShownNoAnimation(false);
                RichPushManager.Shared().RefreshMessages();
                break;

            case Resource.Id.preferences:
                this.StartActivity(new Intent(this, typeof(PushPreferencesActivity)));
                break;
            }
            return(true);
        }
コード例 #2
0
			public bool OnOptionsItemSelected(IMenuItem item) {
			if (item.ItemId == Android.Resource.Id.Home) {
				OnBackPressed();
				return true;
			}
			return false;
		}
コード例 #3
0
 public bool OnOptionsItemSelected(IMenuItem item)
 {
     if (item.ItemId == Android.Resource.Id.Home)
     {
         OnBackPressed();
         return(true);
     }
     return(false);
 }
コード例 #4
0
        public bool OnOptionsItemSelected(IMenuItem menuItem)
        {
            Intent intent = new Intent(this, typeof(InboxActivity));

            intent.AddFlags(ActivityFlags.ClearTop);
            this.StartActivity(intent);

            this.Finish();
            return(true);
        }
コード例 #5
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.preferences:
                this.StartActivity(new Intent(this, typeof(PushPreferencesActivity)));
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }
コード例 #6
0
        /// <summary>
        /// Overriden method for handling Home button for left drawer menu.
        /// </summary>
        /// <param name="item">Seleected menu item.</param>
        /// <returns>True if selected menu item was processed or not.</returns>
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            // handle Home button in this activity for closing and opening menu drawer
            if (item.ItemId == global::Android.Resource.Id.Home)
            {
                if (_drawerLayout.IsDrawerOpen((int)GravityFlags.Left))
                {
                    _drawerLayout.CloseDrawer((int)GravityFlags.Left);
                }
                else
                {
                    _drawerLayout.OpenDrawer((int)GravityFlags.Left);
                }

                return(true);
            }

            return(base.OnOptionsItemSelected(item));
        }
コード例 #7
0
			public bool OnOptionsItemSelected (IMenuItem menuItem)
		{

			Intent intent = new Intent (this, typeof(InboxActivity));
			intent.AddFlags (ActivityFlags.ClearTop);
			this.StartActivity (intent);

			this.Finish ();
			return true;
		}
コード例 #8
0
		public override bool OnOptionsItemSelected (IMenuItem item)
		{
			switch (item.ItemId) {
			case Android.Resource.Id.Home:
				if (slidingPaneLayout != null) {
					if (slidingPaneLayout.IsOpen) {
						slidingPaneLayout.ClosePane ();
					} else {
						slidingPaneLayout.OpenPane ();
					}
				}
				break;
			case Resource.Id.refresh:
				inbox.SetListShownNoAnimation (false);
				RichPushManager.Shared ().RefreshMessages ();
				break;
			case Resource.Id.preferences:
				this.StartActivity (new Intent (this, typeof(PushPreferencesActivity)));
				break;

			}
			return true;
		}
コード例 #9
0
		public override bool OnOptionsItemSelected (IMenuItem item)
		{
			switch (item.ItemId) {
			case Resource.Id.preferences:
				this.StartActivity (new Intent (this, typeof(PushPreferencesActivity)));
				return true;
			default:
				return base.OnOptionsItemSelected (item);
			}
		}