本文整理汇总了Java中org.holoeverywhere.HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU属性的典型用法代码示例。如果您正苦于以下问题:Java HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU属性的具体用法?Java HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU怎么用?Java HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.holoeverywhere.HoloEverywhere
的用法示例。
在下文中一共展示了HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showContextMenuForChild
@Override
public boolean showContextMenuForChild(View originalView) {
if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
return super.showContextMenuForChild(originalView);
}
mListener = mProvider.getContextMenuListener(originalView);
if (mListener == null) {
return false;
}
if (mContextMenu == null) {
mContextMenu = new ContextMenuBuilder(getContext(), mListener);
mContextMenu.setCallback(this);
} else {
mContextMenu.clearAll();
mContextMenu.setContextMenuListener(mListener);
}
mMenuDialogHelper = mContextMenu.show(originalView, originalView.getWindowToken());
if (mMenuDialogHelper != null) {
mMenuDialogHelper.setPresenterCallback(this);
return true;
} else {
return false;
}
}
示例2: registerForContextMenu
@Override
public void registerForContextMenu(View view) {
if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
super.registerForContextMenu(view);
} else {
registerForContextMenu(view, this);
}
}
示例3: unregisterForContextMenu
@Override
public void unregisterForContextMenu(View view) {
if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
super.unregisterForContextMenu(view);
} else {
if (mContextMenuListeners != null) {
mContextMenuListeners.remove(view);
}
}
}
示例4: registerForContextMenu
@Override
public void registerForContextMenu(View view) {
if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
super.registerForContextMenu(view);
} else {
mActivity.registerForContextMenu(view, this);
}
}
示例5: unregisterForContextMenu
@Override
public void unregisterForContextMenu(View view) {
if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
super.unregisterForContextMenu(view);
} else {
mActivity.unregisterForContextMenu(view);
}
}