Exemplo n.º 1
0
        public override bool OnOptionsItemSelected(ActionBar_Sherlock.View.IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                Toast.MakeText(this, "HOME", ToastLength.Short).Show();
                break;

            case Resource.Id.menu_save1:
                Toast.MakeText(this, "TEST1", ToastLength.Short).Show();
                break;

            case Resource.Id.menu_save2:
                Toast.MakeText(this, "TEST2", ToastLength.Short).Show();
                break;

            case Resource.Id.menu_save3:
                Toast.MakeText(this, "TEST3", ToastLength.Short).Show();
                break;

            case Resource.Id.menu_save4:
                Toast.MakeText(this, "TEST4", ToastLength.Short).Show();
                break;

            default:
                Toast.MakeText(this, "OTHER", ToastLength.Short).Show();
                break;
            }
            return(true);
        }
Exemplo n.º 2
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            // If this callback does not handle the item click, onPerformDefaultAction
            // of the ActionProvider is invoked. Hence, the provider encapsulates the
            // complete functionality of the menu item.

            Toast.MakeText(this, "Presiono " + item.TitleFormatted,
                           ToastLength.Short).Show();
            return(false);
        }
Exemplo n.º 3
0
		public override bool OnOptionsItemSelected (IMenuItem item)
		{
			// If this callback does not handle the item click, onPerformDefaultAction
			// of the ActionProvider is invoked. Hence, the provider encapsulates the
			// complete functionality of the menu item.

			Toast.MakeText (this, "Presiono "+item.TitleFormatted,
			               ToastLength.Short).Show ();
			return false;
		}