コード例 #1
0
        public override bool OnOptionsItemSelected
        (
            IMenuItem menuItem
        )
        {
            switch (menuItem.ItemId)
            {
            case Resource.Id.EditSourceItem:
            {
                //EditSourceClicked();

                var objectGridIntent = new Intent(this,
                                                  typeof(AndroidObjectGridActivity));

                StartActivity(objectGridIntent);

                break;
            }

            case Resource.Id.MoreOptionsItem:
            {
                BrowseFooterFragment.ShowPopupMenu(Resource.Menu.BrowseViewPopupMenu);

                break;
            }

            default:
            {
                throw new InvalidOperationException(menuItem.TitleFormatted.ToString());
            }
            }

            return(base.OnOptionsItemSelected(menuItem));
        }
コード例 #2
0
        public override bool OnOptionsItemSelected
        (
            IMenuItem menuItem
        )
        {
            switch (menuItem.ItemId)
            {
            case Resource.Id.AddObjectItem:
            {
                AddImageClicked();

                break;
            }

            case Resource.Id.SearchObjectsItem:
            {
                SearchObjectsClicked();

                break;
            }

            /*case Resource.Id.DeleteObjectItem:
             * {
             *  DeleteReceiptClicked();
             *
             *  break;
             * }*/

            case Resource.Id.MoreOptionsItem:
            {
                BrowseFooterFragment.ShowPopupMenu(Resource.Menu.BrowseViewPopupMenu);

                break;
            }

            default:
            {
                throw new InvalidOperationException(menuItem.TitleFormatted.ToString());
            }
            }

            return(base.OnOptionsItemSelected(menuItem));
        }