Example #1
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.action_changeadapter:
            {
                _useAdapter2 = !_useAdapter2;
                InitAdapter();
                _adapter.NotifyDataSetChanged();
                return(true);
            }

            case Resource.Id.action_contact:
            {
                QuickContactFragment dialog = new QuickContactFragment();
                dialog.Show(SupportFragmentManager, "QuickContactFragment");
                return(true);
            }

            case Resource.Id.action_settabsone:
            {
                _adapter.SetCount(1);
                return(true);
            }

            case Resource.Id.action_settabstwo:
            {
                _adapter.SetCount(2);
                return(true);
            }

            case Resource.Id.action_settabsthree:
            {
                _adapter.SetCount(3);
                return(true);
            }

            case Resource.Id.action_settabsfull:
            {
                _adapter.SetCount(MyPagerAdapter.Titles.Length);
                return(true);
            }
            }

            return(base.OnOptionsItemSelected(item));
        }
		public override bool OnOptionsItemSelected(IMenuItem item)
		{
			switch (item.ItemId)
			{
				case Resource.Id.action_changeadapter:
					{
						_useAdapter2 = !_useAdapter2;
						InitAdapter();
						_adapter.NotifyDataSetChanged();
						return true;
					}
				case Resource.Id.action_contact:
					{
						QuickContactFragment dialog = new QuickContactFragment();
						dialog.Show(SupportFragmentManager, "QuickContactFragment");
						return true;
					}
				case Resource.Id.action_settabsone:
					{
						_adapter.SetCount(1);
						return true;
					}
				case Resource.Id.action_settabstwo:
					{
						_adapter.SetCount(2);
						return true;
					}
				case Resource.Id.action_settabsthree:
					{
						_adapter.SetCount(3);
						return true;
					}
				case Resource.Id.action_settabsfull:
					{
						_adapter.SetCount(MyPagerAdapter.Titles.Length);
						return true;
					}
			}

			return base.OnOptionsItemSelected(item);
		}