本文整理汇总了Java中android.support.v7.internal.view.menu.MenuBuilder类的典型用法代码示例。如果您正苦于以下问题:Java MenuBuilder类的具体用法?Java MenuBuilder怎么用?Java MenuBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MenuBuilder类属于android.support.v7.internal.view.menu包,在下文中一共展示了MenuBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCloseMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final void onCloseMenu(MenuBuilder paramMenuBuilder, boolean paramBoolean)
{
MenuBuilder localMenuBuilder = paramMenuBuilder.getRootMenu();
if (localMenuBuilder != paramMenuBuilder) {}
AppCompatDelegateImplV7.PanelFeatureState localPanelFeatureState;
for (int i = 1;; i = 0)
{
AppCompatDelegateImplV7 localAppCompatDelegateImplV7 = AppCompatDelegateImplV7.this;
if (i != 0) {
paramMenuBuilder = localMenuBuilder;
}
localPanelFeatureState = localAppCompatDelegateImplV7.findMenuPanel(paramMenuBuilder);
if (localPanelFeatureState != null)
{
if (i == 0) {
break;
}
AppCompatDelegateImplV7.this.callOnPanelClosed(localPanelFeatureState.featureId, localPanelFeatureState, localMenuBuilder);
AppCompatDelegateImplV7.this.closePanel(localPanelFeatureState, true);
}
return;
}
AppCompatDelegateImplV7.this.closePanel(localPanelFeatureState, paramBoolean);
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:25,代码来源:AppCompatDelegateImplV7.java
示例2: ensureMenuView
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final void ensureMenuView()
{
if (this.mMenuView == null)
{
this.mMenuView = new ActionMenuView(getContext());
this.mMenuView.setPopupTheme(this.mPopupTheme);
this.mMenuView.setOnMenuItemClickListener(this.mMenuViewItemClickListener);
ActionMenuView localActionMenuView = this.mMenuView;
MenuPresenter.Callback localCallback = this.mActionMenuPresenterCallback;
MenuBuilder.Callback localCallback1 = this.mMenuBuilderCallback;
localActionMenuView.mActionMenuPresenterCallback = localCallback;
localActionMenuView.mMenuBuilderCallback = localCallback1;
LayoutParams localLayoutParams = new LayoutParams();
localLayoutParams.gravity = (0x800005 | 0x70 & this.mButtonGravity);
this.mMenuView.setLayoutParams(localLayoutParams);
addSystemView(this.mMenuView, false);
}
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:19,代码来源:Toolbar.java
示例3: onRestoreInstanceState
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public void onRestoreInstanceState(Parcelable paramParcelable)
{
SavedState localSavedState = (SavedState)paramParcelable;
super.onRestoreInstanceState(localSavedState.getSuperState());
if (this.mMenuView != null) {}
for (MenuBuilder localMenuBuilder = this.mMenuView.mMenu;; localMenuBuilder = null)
{
if ((localSavedState.expandedMenuItemId != 0) && (this.mExpandedMenuPresenter != null) && (localMenuBuilder != null))
{
MenuItem localMenuItem = localMenuBuilder.findItem(localSavedState.expandedMenuItemId);
if (localMenuItem != null) {
MenuItemCompat.expandActionView(localMenuItem);
}
}
if (localSavedState.isOverflowOpen)
{
removeCallbacks(this.mShowOverflowMenuRunnable);
post(this.mShowOverflowMenuRunnable);
}
return;
}
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:23,代码来源:Toolbar.java
示例4: getMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public Menu getMenu()
{
ActionMenuPresenter localActionMenuPresenter;
if (this.mMenu == null)
{
Context localContext = getContext();
this.mMenu = new MenuBuilder(localContext);
this.mMenu.setCallback(new MenuBuilderCallback((byte)0));
this.mPresenter = new ActionMenuPresenter(localContext);
this.mPresenter.setReserveOverflow$1385ff();
localActionMenuPresenter = this.mPresenter;
if (this.mActionMenuPresenterCallback == null) {
break label109;
}
}
label109:
for (Object localObject = this.mActionMenuPresenterCallback;; localObject = new ActionMenuPresenterCallback((byte)0))
{
localActionMenuPresenter.mCallback = ((MenuPresenter.Callback)localObject);
this.mMenu.addMenuPresenter(this.mPresenter, this.mPopupContext);
this.mPresenter.setMenuView(this);
return this.mMenu;
}
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:25,代码来源:ActionMenuView.java
示例5: setUp
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
@Before
public void setUp() {
DummyDataSet.copyDataSet("ASDB_Tabs.db");
contactHelper = HelperFactory.getContacHelper(context);
contacts = contactHelper.getContacts();
activity = Robolectric.buildActivity(TestActivity.class).create().start().resume().get();
fragment = ContactTabFragment.createInstance();
FragmentManager fragmentManager = activity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.fragment_container, fragment);
fragmentTransaction.commit();
recyclerView = (RecyclerView) fragment.getView().findViewById(R.id.recyclerView);
adapter = (ContactTabRecyclerAdapter) recyclerView.getAdapter();
manager = (LinearLayoutManager) recyclerView.getLayoutManager();
menu = new MenuBuilder(activity);
inflater = new MenuInflater(activity);
}
开发者ID:weichweich,项目名称:AluShare,代码行数:21,代码来源:ContactTabFragmentTest.java
示例6: setUp
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
@Before
public void setUp() {
DummyDataSet.copyDataSet("ASDB_Tabs.db");
helper = HelperFactory.getChatHelper(context);
chats = helper.getChats();
activity = Robolectric.buildActivity(TestActivity.class).create().start().resume().get();
fragment = ChatTabFragment.createInstance();
FragmentManager fragmentManager = activity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.fragment_container, fragment);
fragmentTransaction.commit();
recyclerView = (RecyclerView) fragment.getView().findViewById(R.id.recyclerView);
adapter = (ChatTabRecyclerAdapter) recyclerView.getAdapter();
manager = (LinearLayoutManager) recyclerView.getLayoutManager();
menu = new MenuBuilder(activity);
inflater = new MenuInflater(activity);
}
开发者ID:weichweich,项目名称:AluShare,代码行数:21,代码来源:ChatTabFragmentTest.java
示例7: setMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
void setMenu(MenuBuilder menubuilder)
{
if (menubuilder != menu)
{
if (menu != null)
{
menu.removeMenuPresenter(listMenuPresenter);
}
menu = menubuilder;
if (menubuilder != null && listMenuPresenter != null)
{
menubuilder.addMenuPresenter(listMenuPresenter);
return;
}
}
}
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:17,代码来源:AppCompatDelegateImplV7$PanelFeatureState.java
示例8: expandItemActionView
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public boolean expandItemActionView(MenuBuilder menubuilder, MenuItemImpl menuitemimpl)
{
ensureCollapseButtonView();
if (mCollapseButtonView.getParent() != Toolbar.this)
{
addView(mCollapseButtonView);
}
mExpandedActionView = menuitemimpl.getActionView();
mCurrentExpandedItem = menuitemimpl;
if (mExpandedActionView.getParent() != Toolbar.this)
{
menubuilder = generateDefaultLayoutParams();
menubuilder.gravity = 0x800003 | mButtonGravity & 0x70;
menubuilder.mViewType = 2;
mExpandedActionView.setLayoutParams(menubuilder);
addView(mExpandedActionView);
}
removeChildrenForExpandedActionView();
requestLayout();
menuitemimpl.setActionViewExpanded(true);
if (mExpandedActionView instanceof CollapsibleActionView)
{
((CollapsibleActionView)mExpandedActionView).onActionViewExpanded();
}
return true;
}
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:27,代码来源:Toolbar.java
示例9: onOpenSubMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public boolean onOpenSubMenu(MenuBuilder menubuilder)
{
if (menubuilder == null)
{
return false;
}
mOpenSubMenuId = ((SubMenuBuilder)menubuilder).getItem().getItemId();
android.support.v7.internal.view.menu.MenuPresenter.Callback callback = getCallback();
boolean flag;
if (callback != null)
{
flag = callback.onOpenSubMenu(menubuilder);
} else
{
flag = false;
}
return flag;
}
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:19,代码来源:ActionMenuPresenter.java
示例10: checkCloseActionMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
final void checkCloseActionMenu(MenuBuilder paramMenuBuilder)
{
if (this.mClosingActionMenu) {
return;
}
this.mClosingActionMenu = true;
this.mDecorContentParent.dismissPopups();
Window.Callback localCallback = this.mWindow.getCallback();
if ((localCallback != null) && (!this.mIsDestroyed)) {
localCallback.onPanelClosed(108, paramMenuBuilder);
}
this.mClosingActionMenu = false;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:14,代码来源:AppCompatDelegateImplV7.java
示例11: onMenuItemSelected
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final boolean onMenuItemSelected(MenuBuilder paramMenuBuilder, MenuItem paramMenuItem)
{
Window.Callback localCallback = this.mWindow.getCallback();
if ((localCallback != null) && (!this.mIsDestroyed))
{
PanelFeatureState localPanelFeatureState = findMenuPanel(paramMenuBuilder.getRootMenu());
if (localPanelFeatureState != null) {
return localCallback.onMenuItemSelected(localPanelFeatureState.featureId, paramMenuItem);
}
}
return false;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:13,代码来源:AppCompatDelegateImplV7.java
示例12: onMenuModeChange
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final void onMenuModeChange(MenuBuilder paramMenuBuilder)
{
if ((this.mDecorContentParent != null) && (this.mDecorContentParent.canShowOverflowMenu()) && ((!ViewConfigurationCompat.hasPermanentMenuKey(ViewConfiguration.get(this.mContext))) || (this.mDecorContentParent.isOverflowMenuShowPending())))
{
Window.Callback localCallback = this.mWindow.getCallback();
if (!this.mDecorContentParent.isOverflowMenuShowing()) {
if ((localCallback != null) && (!this.mIsDestroyed))
{
if ((this.mInvalidatePanelMenuPosted) && ((0x1 & this.mInvalidatePanelMenuFeatures) != 0))
{
this.mWindowDecor.removeCallbacks(this.mInvalidatePanelMenuRunnable);
this.mInvalidatePanelMenuRunnable.run();
}
PanelFeatureState localPanelFeatureState2 = getPanelState$5103c037(0);
if ((localPanelFeatureState2.menu != null) && (!localPanelFeatureState2.refreshMenuContent) && (localCallback.onPreparePanel(0, localPanelFeatureState2.createdPanelView, localPanelFeatureState2.menu)))
{
localCallback.onMenuOpened(108, localPanelFeatureState2.menu);
this.mDecorContentParent.showOverflowMenu();
}
}
}
do
{
return;
this.mDecorContentParent.hideOverflowMenu();
} while (this.mIsDestroyed);
localCallback.onPanelClosed(108, getPanelState$5103c037(0).menu);
return;
}
PanelFeatureState localPanelFeatureState1 = getPanelState$5103c037(0);
localPanelFeatureState1.refreshDecorView = true;
closePanel(localPanelFeatureState1, false);
openPanel(localPanelFeatureState1, null);
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:35,代码来源:AppCompatDelegateImplV7.java
示例13: onOpenSubMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final boolean onOpenSubMenu(MenuBuilder paramMenuBuilder)
{
Window.Callback localCallback = AppCompatDelegateImplV7.this.mWindow.getCallback();
if (localCallback != null) {
localCallback.onMenuOpened(108, paramMenuBuilder);
}
return true;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:9,代码来源:AppCompatDelegateImplV7.java
示例14: setMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
final void setMenu(MenuBuilder paramMenuBuilder)
{
if (paramMenuBuilder == this.menu) {}
do
{
return;
if (this.menu != null) {
this.menu.removeMenuPresenter(this.listMenuPresenter);
}
this.menu = paramMenuBuilder;
} while ((paramMenuBuilder == null) || (this.listMenuPresenter == null));
paramMenuBuilder.addMenuPresenter(this.listMenuPresenter);
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:14,代码来源:AppCompatDelegateImplV7.java
示例15: onCreatePanelMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public boolean onCreatePanelMenu(int paramInt, Menu paramMenu)
{
if ((paramInt == 0) && (!(paramMenu instanceof MenuBuilder))) {
return false;
}
return super.onCreatePanelMenu(paramInt, paramMenu);
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:8,代码来源:AppCompatDelegateImplBase.java
示例16: StandaloneActionMode
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public StandaloneActionMode(Context paramContext, ActionBarContextView paramActionBarContextView, ActionMode.Callback paramCallback, boolean paramBoolean)
{
this.mContext = paramContext;
this.mContextView = paramActionBarContextView;
this.mCallback = paramCallback;
MenuBuilder localMenuBuilder = new MenuBuilder(paramActionBarContextView.getContext());
localMenuBuilder.mDefaultShowAsAction = 1;
this.mMenu = localMenuBuilder;
this.mMenu.setCallback(this);
this.mFocusable = paramBoolean;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:12,代码来源:StandaloneActionMode.java
示例17: run
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final void run()
{
ToolbarActionBar localToolbarActionBar = ToolbarActionBar.this;
Menu localMenu = localToolbarActionBar.getMenu();
if ((localMenu instanceof MenuBuilder)) {}
for (localMenuBuilder = (MenuBuilder)localMenu;; localMenuBuilder = null)
{
if (localMenuBuilder != null) {
localMenuBuilder.stopDispatchingItemsChanged();
}
try
{
localMenu.clear();
if ((!localToolbarActionBar.mWindowCallback.onCreatePanelMenu(0, localMenu)) || (!localToolbarActionBar.mWindowCallback.onPreparePanel(0, null, localMenu))) {
localMenu.clear();
}
return;
}
finally
{
if (localMenuBuilder == null) {
break;
}
localMenuBuilder.startDispatchingItemsChanged();
}
}
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:28,代码来源:ToolbarActionBar.java
示例18: onCloseMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final void onCloseMenu(MenuBuilder paramMenuBuilder, boolean paramBoolean)
{
if (this.mClosingActionMenu) {
return;
}
this.mClosingActionMenu = true;
ToolbarActionBar.this.mDecorToolbar.dismissPopupMenus();
if (ToolbarActionBar.this.mWindowCallback != null) {
ToolbarActionBar.this.mWindowCallback.onPanelClosed(108, paramMenuBuilder);
}
this.mClosingActionMenu = false;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:13,代码来源:ToolbarActionBar.java
示例19: onOpenSubMenu
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final boolean onOpenSubMenu(MenuBuilder paramMenuBuilder)
{
if (ToolbarActionBar.this.mWindowCallback != null)
{
ToolbarActionBar.this.mWindowCallback.onMenuOpened(108, paramMenuBuilder);
return true;
}
return false;
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:10,代码来源:ToolbarActionBar.java
示例20: onMenuModeChange
import android.support.v7.internal.view.menu.MenuBuilder; //导入依赖的package包/类
public final void onMenuModeChange(MenuBuilder paramMenuBuilder)
{
if (ToolbarActionBar.this.mWindowCallback != null)
{
if (!ToolbarActionBar.this.mDecorToolbar.isOverflowMenuShowing()) {
break label41;
}
ToolbarActionBar.this.mWindowCallback.onPanelClosed(108, paramMenuBuilder);
}
label41:
while (!ToolbarActionBar.this.mWindowCallback.onPreparePanel(0, null, paramMenuBuilder)) {
return;
}
ToolbarActionBar.this.mWindowCallback.onMenuOpened(108, paramMenuBuilder);
}
开发者ID:ChiangC,项目名称:FMTech,代码行数:16,代码来源:ToolbarActionBar.java
注:本文中的android.support.v7.internal.view.menu.MenuBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论