Exemple #1
0
        public override bool OnCreateOptionsMenu(IMenu menu)
        {
            var item = menu.Add("Share");

            item.SetShowAsAction(ShowAsAction.Always);
            if (actionProvider == null)
            {
                actionProvider = new ShareActionProvider(this);
            }
            item.SetActionProvider(actionProvider);
            actionProvider.SetShareIntent(GetShareIntent());

            return(base.OnCreateOptionsMenu(menu));
        }
Exemple #2
0
        public override bool OnCreateOptionsMenu(IMenu menu)
        {
            var item = menu.Add("Share");

            item.SetShowAsAction(ShowAsAction.Always);
            if (actionProvider == null)
            {
                actionProvider = new ShareActionProvider(this);
            }
            item.SetActionProvider(actionProvider);
            actionProvider.SetShareIntent(GetShareIntent());

            //If save:
            item = menu.Add("Save Progress");
            item.SetIcon(Resource.Drawable.ic_action_content_save);
            item.SetShowAsAction(ShowAsAction.Never);
            saveId = item.ItemId;


            return(base.OnCreateOptionsMenu(menu));
        }