本文整理汇总了C#中IMenu.Size方法的典型用法代码示例。如果您正苦于以下问题:C# IMenu.Size方法的具体用法?C# IMenu.Size怎么用?C# IMenu.Size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMenu
的用法示例。
在下文中一共展示了IMenu.Size方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnPrepareOptionsMenu
public override bool OnPrepareOptionsMenu(IMenu menu)
{
var drawerOpen = this._drawer.IsDrawerOpen(this._drawerList);
//when open down't show anything
for (int i = 0; i < menu.Size(); i++)
menu.GetItem(i).SetVisible(!drawerOpen);
return base.OnPrepareOptionsMenu(menu);
}
示例2: OnPrepareOptionsMenu
public override bool OnPrepareOptionsMenu(IMenu menu)
{
var drawerOpen = drawerLayout.IsDrawerOpen(drawerListView);
//When we open the drawer we usually do not want to show any menu options
for (int i = 0; i < menu.Size(); i++)
menu.GetItem(i).SetVisible(!drawerOpen);
return base.OnPrepareOptionsMenu(menu);
}
示例3: OnPrepareOptionsMenu
public override bool OnPrepareOptionsMenu(IMenu menu)
{
if (ActionBar == null)
return base.OnPrepareOptionsMenu(menu);
for (int i = 0; i < menu.Size(); i++)
{
var menuItem = menu.GetItem(i);
menuItem.SetVisible(!ActionBar.MenuItemsToHide.Contains(menuItem.ItemId));
}
return base.OnPrepareOptionsMenu(menu);
}
示例4: OnPrepareOptionsMenu
public override bool OnPrepareOptionsMenu(IMenu menu)
{
if (LegacyBar == null)
return base.OnPrepareOptionsMenu(menu);
menu.Clear();
MenuInflater.Inflate(MenuId, menu);
for (var i = 0; i < menu.Size(); i++)
{
var menuItem = menu.GetItem(i);
menuItem.SetVisible(!LegacyBar.MenuItemsToHide.Contains(menuItem.ItemId));
}
return base.OnPrepareOptionsMenu(menu);
}
示例5: ClearInternal
internal static void ClearInternal(IMenu menu)
{
if (menu == null)
return;
int size = menu.Size();
for (int i = 0; i < size; i++)
MenuItemTemplate.ClearInternal(menu.GetItem(i));
menu.Clear();
menu.ClearBindings(true, true);
}
示例6: OnPrepareOptionsMenu
public override bool OnPrepareOptionsMenu (IMenu menu)
{
var drawerOpen = this.drawerLayout.IsDrawerOpen((int)GravityFlags.Left);
//when open don't show anything
for (int i = 0; i < menu.Size (); i++)
menu.GetItem (i).SetVisible (!drawerOpen);
return base.OnPrepareOptionsMenu (menu);
}