Exemplo n.º 1
0
        public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.IMenuItem item)
        {
            DrawerLayout drawer = (Activity as MainLibraryActivity).drawer;

            switch (item.ItemId)
            {
            case (CHAPTERS_MENU):
                if (flipper.DisplayedChild == (int)ScreenMode.Navigation)
                {
                    flipper.DisplayedChild = (int)mode;
                }
                else
                {
                    flipper.DisplayedChild = (int)ScreenMode.Navigation;
                }
                return(true);

            //case (SCREENMODE_MENU):
            //    ChangeScreen();
            //    return true;
            case (TEXTSIZE_MENU):
                FontSizeDialog(Activity).Show();
                return(true);
            }

            return(base.OnOptionsItemSelected(item));
        }
		public override bool OnOptionsItemSelected (IMenuItem item)
		{
			if (item.ItemId == Android.Resource.Id.Home || item.ItemId == 0) {
				return false;
			}
			THEME = item.ItemId;
			Toast.MakeText (this, "Theme changed to \"" + item.TitleFormatted + "\"", ToastLength.Short).Show ();
			return true;
		}
 /**
  * {@inheritDoc}
  */
 public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.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, "Handling in onOptionsItemSelected avoided",
                    ToastLength.Short).Show();
     return(false);
 }
Exemplo n.º 4
0
 public override bool OnOptionsItemSelected(IMenuItem item)
 {
     if (item.ItemId == Android.Resource.Id.Home || item.ItemId == 0)
     {
         return(false);
     }
     THEME = item.ItemId;
     Toast.MakeText(this, "Theme changed to \"" + item.TitleFormatted + "\"", ToastLength.Short).Show();
     return(true);
 }
Exemplo n.º 5
0
		public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.IMenuItem item)
		{
			switch (item.TitleFormatted.ToString())
		{
			case "Add":
				StartActivity (typeof(AddItem));
			break; 
		}
			return base.OnOptionsItemSelected(item);
		}
Exemplo n.º 6
0
 public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.IMenuItem item)
 {
     switch (item.TitleFormatted.ToString())
     {
     case "Refresh":
         RefreshWeather(count);
         Toast.MakeText(this, "Updated", ToastLength.Short).Show();
         break;
     }
     return(base.OnOptionsItemSelected(item));
 }
Exemplo n.º 7
0
        public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.IMenuItem item)
        {
            switch (item.TitleFormatted.ToString())
            {
            case "Previous":
                OnBtnPreviousClick();
                break;

            case "Next":
                OnBtnNextClick();
                break;
            }
            return(base.OnOptionsItemSelected(item));
        }
 public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.IMenuItem item)
 {
     //This uses the imported MenuItem from ActionBarSherlock
     Toast.MakeText(this, "Got click: " + item.ToString(), ToastLength.Short).Show();
     return(true);
 }
Exemplo n.º 9
0
			public bool OnActionItemClicked (ActionMode mode, IMenuItem item)
			{
				Toast.MakeText (owner, "Got click: " + item, ToastLength.Short).Show ();
				mode.Finish ();
				return true;
			}
Exemplo n.º 10
0
 public bool OnActionItemClicked(ActionMode mode, IMenuItem item)
 {
     Toast.MakeText(owner, "Got click: " + item, ToastLength.Short).Show();
     mode.Finish();
     return(true);
 }
Exemplo n.º 11
0
		public override bool OnOptionsItemSelected (IMenuItem item)
		{
			var itemTitle = item.TitleFormatted.ToString ();

			switch (itemTitle){

			case "Refresh":
				notCurrentLocation = false;

				if (!IsRefreshing) {
					IsRefreshing = true;

					if (locMgr.AllProviders.Contains (LocationManager.NetworkProvider)
					    && locMgr.IsProviderEnabled (LocationManager.NetworkProvider)) 
					{
						locMgr.RequestLocationUpdates (LocationManager.NetworkProvider, 2000, 1, this);
					} else {
						Toast.MakeText (this, "The Network Provider does not exist or is not enabled!", ToastLength.Long).Show ();
					}
					IsRefreshing = false;
				}
				break;
			}
			return base.OnOptionsItemSelected (item);
		}
Exemplo n.º 12
0
 public bool OnActionItemClicked(ActionMode mode, IMenuItem item)
 {
     return clicked(mode, item);
 }