本文整理汇总了Java中com.actionbarsherlock.view.ActionProvider类的典型用法代码示例。如果您正苦于以下问题:Java ActionProvider类的具体用法?Java ActionProvider怎么用?Java ActionProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ActionProvider类属于com.actionbarsherlock.view包,在下文中一共展示了ActionProvider类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performItemAction
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
public boolean performItemAction(MenuItem item, int flags) {
MenuItemImpl itemImpl = (MenuItemImpl) item;
if (itemImpl == null || !itemImpl.isEnabled()) {
return false;
}
boolean invoked = itemImpl.invoke();
if (itemImpl.hasCollapsibleActionView()) {
invoked |= itemImpl.expandActionView();
if (invoked) close(true);
} else if (item.hasSubMenu()) {
close(false);
final SubMenuBuilder subMenu = (SubMenuBuilder) item.getSubMenu();
final ActionProvider provider = item.getActionProvider();
if (provider != null && provider.hasSubMenu()) {
provider.onPrepareSubMenu(subMenu);
}
invoked |= dispatchSubMenuSelected(subMenu);
if (!invoked) close(true);
} else {
if ((flags & FLAG_PERFORM_NO_CLOSE) == 0) {
close(true);
}
}
return invoked;
}
示例2: getActionProvider
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
@Override
public ActionProvider getActionProvider() {
android.view.ActionProvider nativeProvider = mNativeItem.getActionProvider();
if (nativeProvider != null && nativeProvider instanceof ActionProviderWrapper) {
return ((ActionProviderWrapper)nativeProvider).unwrap();
}
return null;
}
示例3: getActionProvider
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
@Override
public ActionProvider getActionProvider() {
android.view.ActionProvider nativeProvider = mNativeItem.getActionProvider();
if (nativeProvider != null && nativeProvider instanceof ActionProviderWrapper) {
return ((ActionProviderWrapper) nativeProvider).unwrap();
}
return null;
}
示例4: ActionProviderWrapper
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
public ActionProviderWrapper(ActionProvider provider) {
super(null/*TODO*/); //XXX this *should* be unused
mProvider = provider;
}
示例5: unwrap
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
public ActionProvider unwrap() {
return mProvider;
}
示例6: getActionProvider
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
@Override
public ActionProvider getActionProvider() {
return null;
}
示例7: setActionProvider
import com.actionbarsherlock.view.ActionProvider; //导入依赖的package包/类
@Override
public MenuItem setActionProvider(ActionProvider actionProvider) {
throw new UnsupportedOperationException();
}