public override bool OnCreateOptionsMenu(IMenu menu) { // Inflate your menu. SupportMenuInflater.Inflate(Resource.Menu.share_action_provider, menu); // Set file with share history to the provider and set the share intent. var actionItem = menu.FindItem(Resource.Id.menu_item_share_action_provider_action_bar); var actionProvider = (ShareActionProvider)actionItem.ActionProvider; actionProvider.SetShareHistoryFileName(ShareActionProvider.DefaultShareHistoryFileName); // Note that you can set/change the intent any time, // say when the user has selected an image. actionProvider.SetShareIntent(CreateShareIntent()); //XXX: For now, ShareActionProviders must be displayed on the action bar // Set file with share history to the provider and set the share intent. //MenuItem overflowItem = menu.findItem(R.id.menu_item_share_action_provider_overflow); //ShareActionProvider overflowProvider = // (ShareActionProvider) overflowItem.getActionProvider(); //overflowProvider.setShareHistoryFileName( // ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME); // Note that you can set/change the intent any time, // say when the user has selected an image. //overflowProvider.setShareIntent(createShareIntent()); return(true); }
public AccountViewHolder(View item, IAccountItemClickListener listener) : base(item) { _tvFullName = item.FindViewById <MaterialTextView>(Resource.Id.item_account_fullname); _tvUserName = item.FindViewById <MaterialTextView>(Resource.Id.item_account_username); _tvFollowings = item.FindViewById <MaterialTextView>(Resource.Id.item_account_followings); _tvFollowers = item.FindViewById <MaterialTextView>(Resource.Id.item_account_followers); _tvUnfollowers = item.FindViewById <MaterialTextView>(Resource.Id.item_account_unfollowers); var menu = new MenuBuilder(ItemView.Context); menu.SetCallback(this); var inflater = new SupportMenuInflater(ItemView.Context); inflater.Inflate(Resource.Menu.popup_account, menu); _popup = new MenuPopupHelper(ItemView.Context, menu); _popup.SetAnchorView(ItemView); _popup.SetForceShowIcon(true); _listener = listener; var card = item.FindViewById <MaterialCardView>(Resource.Id.item_account_card); if (card == null) { return; } card.Click += Item_Click; card.LongClick += Item_LongClick; }
public UnfollowerViewHolder(View item, ICacheProvider cacheProvider, IUnfollowerItemClickListener listener) : base(item) { _cacheProvider = cacheProvider; _listener = listener; _card = item.FindViewById <MaterialCardView>(Resource.Id.item_user_card); _fullNameTextView = item.FindViewById <TextView>(Resource.Id.item_user_fullname); _userNameTextView = item.FindViewById <TextView>(Resource.Id.item_user_username); _avatarImageView = item.FindViewById <ImageView>(Resource.Id.item_user_avatar); var menu = new MenuBuilder(ItemView.Context); menu.SetCallback(this); var inflater = new SupportMenuInflater(ItemView.Context); inflater.Inflate(Resource.Menu.popup_unfollower, menu); var optionMenuButton = item.FindViewById(Resource.Id.item_user_more); _popup = new MenuPopupHelper(ItemView.Context, menu); _popup.SetAnchorView(optionMenuButton); _popup.SetForceShowIcon(true); _card.Click += Item_Click; _card.LongClick += Item_LongClick; optionMenuButton.Click += More_Click; }
public UnfollowerViewHolder( View item, IUnfollowerItemClickListener listener) : base(item) { _card = item.FindViewById <MaterialCardView>(Resource.Id.item_unfollower_card); _tv_fullname = item.FindViewById <MaterialTextView>(Resource.Id.item_unfollower_fullname); _tv_username = item.FindViewById <MaterialTextView>(Resource.Id.item_unfollower_username); _menu = new MenuBuilder(ItemView.Context); _menu.SetCallback(this); var inflater = new SupportMenuInflater(ItemView.Context); inflater.Inflate(Resource.Menu.popup_unfollower, _menu); _popup = new MenuPopupHelper(ItemView.Context, _menu); _popup.SetAnchorView(ItemView); _popup.SetForceShowIcon(true); _listener = listener; _card.Click += Item_Click; _card.LongClick += Item_LongClick; }
public override bool OnCreateOptionsMenu(IMenu menu) { SupportMenuInflater.Inflate(Resource.Menu.favourites_toggle, menu); return(true); }
/** * {@inheritDoc} */ public override bool OnCreateOptionsMenu(Xamarin.ActionbarSherlockBinding.Views.IMenu menu) { base.OnCreateOptionsMenu(menu); SupportMenuInflater.Inflate(Resource.Menu.settings_action_provider, menu); return(true); }
public override bool OnCreateOptionsMenu(IMenu menu) { SupportMenuInflater.Inflate(Resource.Menu.menu_propertycrossview, menu); return(true); }
public override bool OnCreateOptionsMenu(IMenu menu) { SupportMenuInflater.Inflate(Resource.Menu.inbox_menu, menu); return(true); }