本文整理匯總了Java中com.actionbarsherlock.internal.app.ActionBarImpl類的典型用法代碼示例。如果您正苦於以下問題:Java ActionBarImpl類的具體用法?Java ActionBarImpl怎麽用?Java ActionBarImpl使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ActionBarImpl類屬於com.actionbarsherlock.internal.app包,在下文中一共展示了ActionBarImpl類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: invalidateOptionsMenu
import com.actionbarsherlock.internal.app.ActionBarImpl; //導入依賴的package包/類
@Override
public void invalidateOptionsMenu() {
if (DEBUG) Log.d(TAG, "[invalidateOptionsMenu]");
if (IS_HONEYCOMB) {
HoneycombInvalidateOptionsMenu.invoke(this);
return;
}
if (mSupportMenu == null) {
mSupportMenu = new MenuBuilder(this);
mSupportMenu.setCallback(mSupportMenuCallback);
}
mSupportMenu.stopDispatchingItemsChanged();
mSupportMenu.clear();
if (!dispatchCreateOptionsMenu()) {
if (mActionBar != null) {
((ActionBarImpl)mActionBar).setMenu(null, mMenuPresenterCallback);
}
return;
}
if (!dispatchPrepareOptionsMenu()) {
if (mActionBar != null) {
((ActionBarImpl)mActionBar).setMenu(null, mMenuPresenterCallback);
}
mSupportMenu.startDispatchingItemsChanged();
return;
}
mSupportMenu.startDispatchingItemsChanged();
if (mActionBar != null) {
((ActionBarImpl)mActionBar).setMenu(mSupportMenu, mMenuPresenterCallback);
}
}
示例2: onPanelClosed
import com.actionbarsherlock.internal.app.ActionBarImpl; //導入依賴的package包/類
/**
* Call onOptionsMenuClosed() on fragments.
*/
@Override
public void onPanelClosed(int featureId, android.view.Menu menu) {
switch (featureId) {
case Window.FEATURE_OPTIONS_PANEL:
mFragments.dispatchOptionsMenuClosed(new MenuWrapper(menu));
if (!IS_HONEYCOMB && (getSupportActionBar() != null)) {
if (DEBUG) Log.d(TAG, "onPanelClosed(int, android.view.Menu): Dispatch menu visibility false to custom action bar.");
((ActionBarImpl)mActionBar).onMenuVisibilityChanged(false);
}
break;
}
super.onPanelClosed(featureId, menu);
}