本文整理匯總了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();
}