public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                //The hamburger icon was clicked which means the drawer toggle will handle the event
                //all we need to do is ensure the right drawer is closed so the don't overlap
                mDrawerLayout.CloseDrawer(mRightDrawer);
                mDrawerToggle.OnOptionsItemSelected(item);
                return(true);

            case Resource.Id.action_refresh:
                //Refresh
                return(true);

            case Resource.Id.action_help:
                if (mDrawerLayout.IsDrawerOpen(mRightDrawer))
                {
                    //Right Drawer is already open, close it
                    mDrawerLayout.CloseDrawer(mRightDrawer);
                }

                else
                {
                    //Right Drawer is closed, open it and just in case close left drawer
                    mDrawerLayout.OpenDrawer(mRightDrawer);
                    mDrawerLayout.CloseDrawer(mLeftDrawer);
                }

                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }
Beispiel #2
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                //The hamburger icon was clicked which means the drawer toggle will handle the event


                mDrawerToggle.OnOptionsItemSelected(item);
                return(true);


            case Resource.Id.action_refresh:
                Toast.MakeText(this, "Refresh clicked", ToastLength.Short).Show();
                return(true);

            case Resource.Id.action_help:

                Toast.MakeText(this, "Help clicked", ToastLength.Short).Show();
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }
Beispiel #3
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                //The hamburger icon was clicked which means the drawer toggle will handle the event


                mDrawerToggle.OnOptionsItemSelected(item);
                return(true);

            case Resource.Id.action_refresh:
                //Refresh
                return(true);

            case Resource.Id.action_help:


                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }