本文整理汇总了C#中android.hasVisibleItems方法的典型用法代码示例。如果您正苦于以下问题:C# android.hasVisibleItems方法的具体用法?C# android.hasVisibleItems怎么用?C# android.hasVisibleItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android
的用法示例。
在下文中一共展示了android.hasVisibleItems方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onSubMenuSelected
public override bool onSubMenuSelected([email protected]
subMenu)
{
if (!subMenu.hasVisibleItems())
{
return false;
}
// The window manager will give us a token.
[email protected] helper = new [email protected]
(subMenu);
helper.setPresenterCallback(mSubMenuPresenterCallback);
helper.show(null);
mOpenSubMenu = helper;
mOpenSubMenuId = subMenu.getItem().getItemId();
base.onSubMenuSelected(subMenu);
return true;
}
示例2: onOpenSubMenu
public virtual bool onOpenSubMenu([email protected] subMenu
)
{
if (subMenu == null)
{
return false;
}
if (!subMenu.hasVisibleItems())
{
return true;
}
// Current menu will be dismissed by the normal helper, submenu will be shown in its place.
new [email protected](mContext, subMenu, mAnchor).show(
);
return true;
}
示例3: onPreparePanel
public virtual bool onPreparePanel(int featureId, android.view.View view, android.view.Menu
menu)
{
if (featureId == android.view.Window.FEATURE_OPTIONS_PANEL && menu != null)
{
bool goforit = onPrepareOptionsMenu(menu);
goforit |= mFragments.dispatchPrepareOptionsMenu(menu);
return goforit && menu.hasVisibleItems();
}
return true;
}
示例4: onSubMenuSelected
public virtual bool onSubMenuSelected([email protected]
subMenu)
{
if (!subMenu.hasVisibleItems())
{
return false;
}
// The window manager will give us a token.
new [email protected](subMenu).show(null);
if (mCallback != null)
{
mCallback.onOpenSubMenu(subMenu);
}
return true;
}
示例5: onSubMenuSelected
public virtual bool onSubMenuSelected([email protected]
subMenu)
{
if (subMenu.hasVisibleItems())
{
[email protected] subPopup = new [email protected]
(mContext, subMenu, mAnchorView, false);
subPopup.setCallback(mPresenterCallback);
bool preserveIconSpacing = false;
int count = subMenu.size();
{
for (int i = 0; i < count; i++)
{
android.view.MenuItem childItem = subMenu.getItem(i);
if (childItem.isVisible() && childItem.getIcon() != null)
{
preserveIconSpacing = true;
break;
}
}
}
subPopup.setForceShowIcon(preserveIconSpacing);
if (subPopup.tryShow())
{
if (mPresenterCallback != null)
{
mPresenterCallback.onOpenSubMenu(subMenu);
}
return true;
}
}
return false;
}
示例6: onSubMenuSelected
public virtual bool onSubMenuSelected([email protected]
subMenu)
{
if (this.mCallback == null)
{
return false;
}
if (!subMenu.hasVisibleItems())
{
return true;
}
new [email protected](this._enclosing.getThemedContext(
), subMenu).show();
return true;
}