From cd6801f55482de7bf88f69ee29c3b3276446ba5b Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 8 May 2015 23:52:20 +0200 Subject: [PATCH] Fix appcompat --- .../layout/abc_action_menu_item_layout.xml | 2 +- .../res/layout/abc_expanded_menu_layout.xml | 2 +- .../res/layout/abc_list_menu_item_layout.xml | 4 +-- .../res/layout/abc_popup_menu_item_layout.xml | 4 +-- .../v7/app/AppCompatDelegateImplBase.java | 6 ++-- .../v7/app/AppCompatDelegateImplV7.java | 32 ++++++++--------- .../v7/internal/app/ToolbarActionBar.java | 26 +++++++------- .../v7/internal/app/WindowDecorActionBar.java | 18 +++++----- .../internal/view/StandaloneActionMode.java | 18 +++++----- .../view/SupportActionModeWrapper.java | 2 +- .../v7/internal/view/SupportMenuInflater.java | 4 +-- .../internal/widget/ActionBarContextView.java | 4 +-- .../widget/ActionBarOverlayLayout.java | 2 +- .../internal/widget/DecorContentParent.java | 2 +- .../v7/internal/widget/DecorToolbar.java | 6 ++-- .../internal/widget/ToolbarWidgetWrapper.java | 10 +++--- .../v7/widget/ActionMenuPresenter.java | 24 ++++++------- .../support/v7/widget/ActionMenuView.java | 34 +++++++++---------- .../android/support/v7/widget/PopupMenu.java | 22 ++++++------ .../android/support/v7/widget/Toolbar.java | 30 ++++++++-------- .../rmenu}/ActionMenuItem.java | 2 +- .../rmenu}/ActionMenuItemView.java | 6 ++-- .../rmenu}/BaseMenuPresenter.java | 12 +++---- .../rmenu}/BaseMenuWrapper.java | 2 +- .../rmenu}/BaseWrapper.java | 2 +- .../rmenu}/ExpandedMenuView.java | 12 +++---- .../rmenu}/ListMenuItemView.java | 2 +- .../rmenu}/ListMenuPresenter.java | 12 +++---- .../rmenu/MBuilder.java} | 28 +++++++-------- .../rmenu}/MenuDialogHelper.java | 12 +++---- .../rmenu}/MenuItemImpl.java | 6 ++-- .../rmenu}/MenuItemWrapperICS.java | 2 +- .../rmenu}/MenuItemWrapperJB.java | 2 +- .../rmenu}/MenuPopupHelper.java | 24 ++++++------- .../rmenu}/MenuPresenter.java | 18 +++++----- .../rmenu}/MenuView.java | 10 +++--- .../rmenu}/MenuWrapperFactory.java | 2 +- .../rmenu}/MenuWrapperICS.java | 2 +- .../rmenu}/SubMenuBuilder.java | 12 +++---- .../rmenu}/SubMenuWrapperICS.java | 2 +- 40 files changed, 211 insertions(+), 211 deletions(-) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/ActionMenuItem.java (99%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/ActionMenuItemView.java (98%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/BaseMenuPresenter.java (94%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/BaseMenuWrapper.java (98%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/BaseWrapper.java (94%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/ExpandedMenuView.java (88%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/ListMenuItemView.java (99%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/ListMenuPresenter.java (95%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu/MenuBuilder.java => androidv7/rmenu/MBuilder.java} (98%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuDialogHelper.java (94%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuItemImpl.java (99%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuItemWrapperICS.java (99%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuItemWrapperJB.java (98%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuPopupHelper.java (93%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuPresenter.java (88%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuView.java (92%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuWrapperFactory.java (97%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/MenuWrapperICS.java (98%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/SubMenuBuilder.java (90%) rename eclipse-compile/appcompat/src/{android/support/v7/internal/view/renamemenu => androidv7/rmenu}/SubMenuWrapperICS.java (97%) diff --git a/eclipse-compile/appcompat/res/layout/abc_action_menu_item_layout.xml b/eclipse-compile/appcompat/res/layout/abc_action_menu_item_layout.xml index b1d68274b0..4df82e88cb 100644 --- a/eclipse-compile/appcompat/res/layout/abc_action_menu_item_layout.xml +++ b/eclipse-compile/appcompat/res/layout/abc_action_menu_item_layout.xml @@ -14,7 +14,7 @@ limitations under the License. --> - - - @@ -57,4 +57,4 @@ - + diff --git a/eclipse-compile/appcompat/res/layout/abc_popup_menu_item_layout.xml b/eclipse-compile/appcompat/res/layout/abc_popup_menu_item_layout.xml index 43fa49a6d6..7e9ba96f6f 100644 --- a/eclipse-compile/appcompat/res/layout/abc_popup_menu_item_layout.xml +++ b/eclipse-compile/appcompat/res/layout/abc_popup_menu_item_layout.xml @@ -14,7 +14,7 @@ limitations under the License. --> - - + diff --git a/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplBase.java b/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplBase.java index fd03461246..b7959a971c 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplBase.java +++ b/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplBase.java @@ -26,7 +26,6 @@ import android.os.Bundle; import android.support.v7.appcompat.R; import android.support.v7.internal.view.SupportMenuInflater; import android.support.v7.internal.view.WindowCallbackWrapper; -import android.support.v7.internal.view.renamemenu.MenuBuilder; import android.support.v7.internal.widget.TintTypedArray; import android.support.v7.view.ActionMode; import android.view.KeyEvent; @@ -34,6 +33,7 @@ import android.view.Menu; import android.view.MenuInflater; import android.view.View; import android.view.Window; +import androidv7.rmenu.MBuilder; abstract class AppCompatDelegateImplBase extends AppCompatDelegate { @@ -243,7 +243,7 @@ abstract class AppCompatDelegateImplBase extends AppCompatDelegate { @Override public boolean onCreatePanelMenu(int featureId, Menu menu) { - if (featureId == Window.FEATURE_OPTIONS_PANEL && !(menu instanceof MenuBuilder)) { + if (featureId == Window.FEATURE_OPTIONS_PANEL && !(menu instanceof MBuilder)) { // If this is an options menu but it's not an AppCompat menu, we eat the event // and return false return false; @@ -253,7 +253,7 @@ abstract class AppCompatDelegateImplBase extends AppCompatDelegate { @Override public boolean onPreparePanel(int featureId, View view, Menu menu) { - if (featureId == Window.FEATURE_OPTIONS_PANEL && !(menu instanceof MenuBuilder)) { + if (featureId == Window.FEATURE_OPTIONS_PANEL && !(menu instanceof MBuilder)) { // If this is an options menu but it's not an AppCompat menu, we eat the event // and return false return false; diff --git a/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java b/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java index eac79f9aee..99f15f2b76 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java +++ b/eclipse-compile/appcompat/src/android/support/v7/app/AppCompatDelegateImplV7.java @@ -43,10 +43,6 @@ import android.support.v7.internal.app.ToolbarActionBar; import android.support.v7.internal.app.WindowDecorActionBar; import android.support.v7.internal.view.ContextThemeWrapper; import android.support.v7.internal.view.StandaloneActionMode; -import android.support.v7.internal.view.renamemenu.ListMenuPresenter; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPresenter; -import android.support.v7.internal.view.renamemenu.MenuView; import android.support.v7.internal.widget.ActionBarContextView; import android.support.v7.internal.widget.DecorContentParent; import android.support.v7.internal.widget.FitWindowsViewGroup; @@ -78,6 +74,10 @@ import android.view.accessibility.AccessibilityEvent; import android.widget.FrameLayout; import android.widget.PopupWindow; import android.widget.TextView; +import androidv7.rmenu.ListMenuPresenter; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPresenter; +import androidv7.rmenu.MenuView; import static android.support.v4.view.WindowCompat.FEATURE_ACTION_BAR; import static android.support.v4.view.WindowCompat.FEATURE_ACTION_BAR_OVERLAY; import static android.support.v4.view.WindowCompat.FEATURE_ACTION_MODE_OVERLAY; @@ -86,7 +86,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static android.view.Window.FEATURE_OPTIONS_PANEL; class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase - implements MenuBuilder.Callback, LayoutInflaterFactory { + implements MBuilder.Callback, LayoutInflaterFactory { private DecorContentParent mDecorContentParent; private ActionMenuPresenterCallback mActionMenuPresenterCallback; @@ -545,7 +545,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase } @Override - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { + public boolean onMenuItemSelected(MBuilder menu, MenuItem item) { final Window.Callback cb = getWindowCallback(); if (cb != null && !isDestroyed()) { final PanelFeatureState panel = findMenuPanel(menu.getRootMenu()); @@ -557,7 +557,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase } @Override - public void onMenuModeChange(MenuBuilder menu) { + public void onMenuModeChange(MBuilder menu) { reopenMenu(menu, true); } @@ -927,7 +927,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase return true; } - private void reopenMenu(MenuBuilder menu, boolean toggleMenuMode) { + private void reopenMenu(MBuilder menu, boolean toggleMenuMode) { if (mDecorContentParent != null && mDecorContentParent.canShowOverflowMenu() && (!ViewConfigurationCompat.hasPermanentMenuKey(ViewConfiguration.get(mContext)) || mDecorContentParent.isOverflowMenuShowPending())) { @@ -1007,7 +1007,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase } } - final MenuBuilder menu = new MenuBuilder(context); + final MBuilder menu = new MBuilder(context); menu.setCallback(this); st.setMenu(menu); @@ -1137,7 +1137,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase return true; } - private void checkCloseActionMenu(MenuBuilder menu) { + private void checkCloseActionMenu(MBuilder menu) { if (mClosingActionMenu) { return; } @@ -1506,7 +1506,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase private final class PanelMenuPresenterCallback implements MenuPresenter.Callback { @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { final Menu parentMenu = menu.getRootMenu(); final boolean isSubMenu = parentMenu != menu; final PanelFeatureState panel = findMenuPanel(isSubMenu ? parentMenu : menu); @@ -1523,7 +1523,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase } @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { if (subMenu == null && mHasActionBar) { Window.Callback cb = getWindowCallback(); if (cb != null && !isDestroyed()) { @@ -1536,7 +1536,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase private final class ActionMenuPresenterCallback implements MenuPresenter.Callback { @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { Window.Callback cb = getWindowCallback(); if (cb != null) { cb.onMenuOpened(FEATURE_ACTION_BAR, subMenu); @@ -1545,7 +1545,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { checkCloseActionMenu(menu); } } @@ -1575,7 +1575,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase View createdPanelView; /** Use {@link #setMenu} to set this. */ - MenuBuilder menu; + MBuilder menu; ListMenuPresenter listMenuPresenter; @@ -1670,7 +1670,7 @@ class AppCompatDelegateImplV7 extends AppCompatDelegateImplBase a.recycle(); } - void setMenu(MenuBuilder menu) { + void setMenu(MBuilder menu) { if (menu == this.menu) return; if (this.menu != null) { diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/app/ToolbarActionBar.java b/eclipse-compile/appcompat/src/android/support/v7/internal/app/ToolbarActionBar.java index 2be46f0c7c..857344b5b4 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/app/ToolbarActionBar.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/app/ToolbarActionBar.java @@ -26,9 +26,6 @@ import android.support.v4.view.WindowCompat; import android.support.v7.app.ActionBar; import android.support.v7.internal.view.WindowCallbackWrapper; import android.support.v7.appcompat.R; -import android.support.v7.internal.view.renamemenu.ListMenuPresenter; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPresenter; import android.support.v7.internal.widget.DecorToolbar; import android.support.v7.internal.widget.ToolbarWidgetWrapper; import android.support.v7.widget.Toolbar; @@ -41,6 +38,9 @@ import android.view.MenuItem; import android.view.View; import android.view.Window; import android.widget.SpinnerAdapter; +import androidv7.rmenu.ListMenuPresenter; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPresenter; import java.util.ArrayList; @@ -440,7 +440,7 @@ public class ToolbarActionBar extends ActionBar { void populateOptionsMenu() { final Menu menu = getMenu(); - final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null; + final MBuilder mb = menu instanceof MBuilder ? (MBuilder) menu : null; if (mb != null) { mb.stopDispatchingItemsChanged(); } @@ -505,8 +505,8 @@ public class ToolbarActionBar extends ActionBar { } private void ensureListMenuPresenter(Menu menu) { - if (mListMenuPresenter == null && (menu instanceof MenuBuilder)) { - MenuBuilder mb = (MenuBuilder) menu; + if (mListMenuPresenter == null && (menu instanceof MBuilder)) { + MBuilder mb = (MBuilder) menu; Context context = mDecorToolbar.getContext(); final TypedValue outValue = new TypedValue(); @@ -573,7 +573,7 @@ public class ToolbarActionBar extends ActionBar { private boolean mClosingActionMenu; @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { if (mWindowCallback != null) { mWindowCallback.onMenuOpened(WindowCompat.FEATURE_ACTION_BAR, subMenu); return true; @@ -582,7 +582,7 @@ public class ToolbarActionBar extends ActionBar { } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (mClosingActionMenu) { return; } @@ -598,14 +598,14 @@ public class ToolbarActionBar extends ActionBar { private final class PanelMenuPresenterCallback implements MenuPresenter.Callback { @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (mWindowCallback != null) { mWindowCallback.onPanelClosed(Window.FEATURE_OPTIONS_PANEL, menu); } } @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { if (subMenu == null && mWindowCallback != null) { mWindowCallback.onMenuOpened(Window.FEATURE_OPTIONS_PANEL, subMenu); } @@ -613,15 +613,15 @@ public class ToolbarActionBar extends ActionBar { } } - private final class MenuBuilderCallback implements MenuBuilder.Callback { + private final class MenuBuilderCallback implements MBuilder.Callback { @Override - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { + public boolean onMenuItemSelected(MBuilder menu, MenuItem item) { return false; } @Override - public void onMenuModeChange(MenuBuilder menu) { + public void onMenuModeChange(MBuilder menu) { if (mWindowCallback != null) { if (mDecorToolbar.isOverflowMenuShowing()) { mWindowCallback.onPanelClosed(WindowCompat.FEATURE_ACTION_BAR, menu); diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/app/WindowDecorActionBar.java b/eclipse-compile/appcompat/src/android/support/v7/internal/app/WindowDecorActionBar.java index 479ebb6dc9..2641bc77cd 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/app/WindowDecorActionBar.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/app/WindowDecorActionBar.java @@ -36,9 +36,6 @@ import android.support.v7.appcompat.R; import android.support.v7.internal.view.ActionBarPolicy; import android.support.v7.internal.view.ViewPropertyAnimatorCompatSet; import android.support.v7.internal.view.SupportMenuInflater; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPopupHelper; -import android.support.v7.internal.view.renamemenu.SubMenuBuilder; import android.support.v7.internal.widget.ActionBarContainer; import android.support.v7.internal.widget.ActionBarContextView; import android.support.v7.internal.widget.ActionBarOverlayLayout; @@ -59,6 +56,9 @@ import android.view.Window; import android.view.accessibility.AccessibilityEvent; import android.view.animation.AnimationUtils; import android.widget.SpinnerAdapter; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPopupHelper; +import androidv7.rmenu.SubMenuBuilder; import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -949,9 +949,9 @@ public class WindowDecorActionBar extends ActionBar implements /** * @hide */ - public class ActionModeImpl extends ActionMode implements MenuBuilder.Callback { + public class ActionModeImpl extends ActionMode implements MBuilder.Callback { private final Context mActionModeContext; - private final MenuBuilder mMenu; + private final MBuilder mMenu; private ActionMode.Callback mCallback; private WeakReference mCustomView; @@ -959,7 +959,7 @@ public class WindowDecorActionBar extends ActionBar implements public ActionModeImpl(Context context, ActionMode.Callback callback) { mActionModeContext = context; mCallback = callback; - mMenu = new MenuBuilder(context) + mMenu = new MBuilder(context) .setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); } @@ -1083,7 +1083,7 @@ public class WindowDecorActionBar extends ActionBar implements return mCustomView != null ? mCustomView.get() : null; } - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { + public boolean onMenuItemSelected(MBuilder menu, MenuItem item) { if (mCallback != null) { return mCallback.onActionItemClicked(this, item); } else { @@ -1091,7 +1091,7 @@ public class WindowDecorActionBar extends ActionBar implements } } - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { } public boolean onSubMenuSelected(SubMenuBuilder subMenu) { @@ -1110,7 +1110,7 @@ public class WindowDecorActionBar extends ActionBar implements public void onCloseSubMenu(SubMenuBuilder menu) { } - public void onMenuModeChange(MenuBuilder menu) { + public void onMenuModeChange(MBuilder menu) { if (mCallback == null) { return; } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/StandaloneActionMode.java b/eclipse-compile/appcompat/src/android/support/v7/internal/view/StandaloneActionMode.java index ef6a69c50c..0ba5c5f4a0 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/StandaloneActionMode.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/view/StandaloneActionMode.java @@ -18,9 +18,6 @@ package android.support.v7.internal.view; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPopupHelper; -import android.support.v7.internal.view.renamemenu.SubMenuBuilder; import android.support.v7.internal.widget.ActionBarContextView; import android.support.v7.view.ActionMode; import android.view.Menu; @@ -28,13 +25,16 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.accessibility.AccessibilityEvent; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPopupHelper; +import androidv7.rmenu.SubMenuBuilder; import java.lang.ref.WeakReference; /** * @hide */ -public class StandaloneActionMode extends ActionMode implements MenuBuilder.Callback { +public class StandaloneActionMode extends ActionMode implements MBuilder.Callback { private Context mContext; private ActionBarContextView mContextView; private ActionMode.Callback mCallback; @@ -42,7 +42,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call private boolean mFinished; private boolean mFocusable; - private MenuBuilder mMenu; + private MBuilder mMenu; public StandaloneActionMode(Context context, ActionBarContextView view, ActionMode.Callback callback, boolean isFocusable) { @@ -50,7 +50,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call mContextView = view; mCallback = callback; - mMenu = new MenuBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); + mMenu = new MBuilder(context).setDefaultShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); mMenu.setCallback(this); mFocusable = isFocusable; } @@ -133,11 +133,11 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call return new MenuInflater(mContext); } - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { + public boolean onMenuItemSelected(MBuilder menu, MenuItem item) { return mCallback.onActionItemClicked(this, item); } - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { } public boolean onSubMenuSelected(SubMenuBuilder subMenu) { @@ -152,7 +152,7 @@ public class StandaloneActionMode extends ActionMode implements MenuBuilder.Call public void onCloseSubMenu(SubMenuBuilder menu) { } - public void onMenuModeChange(MenuBuilder menu) { + public void onMenuModeChange(MBuilder menu) { invalidate(); mContextView.showOverflowMenu(); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportActionModeWrapper.java b/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportActionModeWrapper.java index 75aa66c848..d236f13b3c 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportActionModeWrapper.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportActionModeWrapper.java @@ -22,11 +22,11 @@ import android.os.Build; import android.support.v4.internal.view.SupportMenu; import android.support.v4.internal.view.SupportMenuItem; import android.support.v4.util.SimpleArrayMap; -import android.support.v7.internal.view.renamemenu.MenuWrapperFactory; import android.view.ActionMode; import android.view.Menu; import android.view.MenuInflater; import android.view.View; +import androidv7.rmenu.MenuWrapperFactory; /** * Wraps a support {@link android.support.v7.view.ActionMode} as a framework diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportMenuInflater.java b/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportMenuInflater.java index 1fcc846e95..cd88bebcfc 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportMenuInflater.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/view/SupportMenuInflater.java @@ -28,8 +28,6 @@ import android.support.v4.internal.view.SupportMenu; import android.support.v4.view.ActionProvider; import android.support.v4.view.MenuItemCompat; import android.support.v7.appcompat.R; -import android.support.v7.internal.view.renamemenu.MenuItemImpl; -import android.support.v7.internal.view.renamemenu.MenuItemWrapperICS; import android.util.AttributeSet; import android.util.Log; import android.util.Xml; @@ -39,6 +37,8 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.SubMenu; import android.view.View; +import androidv7.rmenu.MenuItemImpl; +import androidv7.rmenu.MenuItemWrapperICS; import java.io.IOException; import java.lang.reflect.Constructor; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarContextView.java b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarContextView.java index 75a623d4a9..bc5cb1e28e 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarContextView.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarContextView.java @@ -28,7 +28,6 @@ import android.support.v7.internal.view.ViewPropertyAnimatorCompatSet; import android.support.v7.view.ActionMode; import android.support.v7.widget.ActionMenuPresenter; import android.support.v7.widget.ActionMenuView; -import android.support.v7.internal.view.renamemenu.MenuBuilder; import android.text.TextUtils; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -38,6 +37,7 @@ import android.view.accessibility.AccessibilityEvent; import android.view.animation.DecelerateInterpolator; import android.widget.LinearLayout; import android.widget.TextView; +import androidv7.rmenu.MBuilder; /** * @hide @@ -222,7 +222,7 @@ public class ActionBarContextView extends AbsActionBarView implements ViewProper } }); - final MenuBuilder menu = (MenuBuilder) mode.getMenu(); + final MBuilder menu = (MBuilder) mode.getMenu(); if (mActionMenuPresenter != null) { mActionMenuPresenter.dismissPopupMenus(); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarOverlayLayout.java b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarOverlayLayout.java index 0a6b33fa7b..81abf3cf69 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarOverlayLayout.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ActionBarOverlayLayout.java @@ -31,7 +31,6 @@ import android.support.v4.view.ViewPropertyAnimatorListenerAdapter; import android.support.v4.widget.ScrollerCompat; import android.support.v7.appcompat.R; import android.support.v7.internal.VersionUtils; -import android.support.v7.internal.view.renamemenu.MenuPresenter; import android.support.v7.widget.Toolbar; import android.util.AttributeSet; import android.util.SparseArray; @@ -39,6 +38,7 @@ import android.view.Menu; import android.view.View; import android.view.ViewGroup; import android.view.Window; +import androidv7.rmenu.MenuPresenter; /** * Special layout for the containing of an overlay action bar (and its content) to correctly handle diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorContentParent.java b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorContentParent.java index 780aeebbe1..3563a4ccda 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorContentParent.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorContentParent.java @@ -19,10 +19,10 @@ package android.support.v7.internal.widget; import android.graphics.drawable.Drawable; import android.os.Parcelable; -import android.support.v7.internal.view.renamemenu.MenuPresenter; import android.util.SparseArray; import android.view.Menu; import android.view.Window; +import androidv7.rmenu.MenuPresenter; /** * Implemented by the top-level decor layout for a window. DecorContentParent offers diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorToolbar.java b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorToolbar.java index f824dd7c11..42f42b0a83 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorToolbar.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/DecorToolbar.java @@ -20,14 +20,14 @@ package android.support.v7.internal.widget; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Parcelable; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPresenter; import android.util.SparseArray; import android.view.Menu; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.widget.SpinnerAdapter; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPresenter; /** * Common interface for a toolbar that sits as part of the window decor. @@ -98,7 +98,7 @@ public interface DecorToolbar { void setVisibility(int visible); int getVisibility(); void setMenuCallbacks(MenuPresenter.Callback presenterCallback, - MenuBuilder.Callback menuBuilderCallback); + MBuilder.Callback menuBuilderCallback); Menu getMenu(); int getPopupTheme(); } \ No newline at end of file diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ToolbarWidgetWrapper.java b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ToolbarWidgetWrapper.java index 148bb27c8e..3ee9ec8eaa 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ToolbarWidgetWrapper.java +++ b/eclipse-compile/appcompat/src/android/support/v7/internal/widget/ToolbarWidgetWrapper.java @@ -24,9 +24,6 @@ import android.os.Parcelable; import android.support.v4.view.ViewCompat; import android.support.v4.view.ViewPropertyAnimatorListenerAdapter; import android.support.v7.appcompat.R; -import android.support.v7.internal.view.renamemenu.ActionMenuItem; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPresenter; import android.support.v7.widget.ActionMenuPresenter; import android.support.v7.widget.Toolbar; import android.text.TextUtils; @@ -39,6 +36,9 @@ import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.widget.SpinnerAdapter; +import androidv7.rmenu.ActionMenuItem; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPresenter; /** * Internal class used to interact with the Toolbar widget without @@ -411,7 +411,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar { mActionMenuPresenter.setId(R.id.action_menu_presenter); } mActionMenuPresenter.setCallback(cb); - mToolbar.setMenu((MenuBuilder) menu, mActionMenuPresenter); + mToolbar.setMenu((MBuilder) menu, mActionMenuPresenter); } @Override @@ -699,7 +699,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar { @Override public void setMenuCallbacks(MenuPresenter.Callback actionMenuPresenterCallback, - MenuBuilder.Callback menuBuilderCallback) { + MBuilder.Callback menuBuilderCallback) { mToolbar.setMenuCallbacks(actionMenuPresenterCallback, menuBuilderCallback); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuPresenter.java b/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuPresenter.java index 054fb7875f..d4cda5f122 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuPresenter.java +++ b/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuPresenter.java @@ -28,13 +28,6 @@ import android.support.v4.view.GravityCompat; import android.support.v7.appcompat.R; import android.support.v7.internal.transition.ActionBarTransition; import android.support.v7.internal.view.ActionBarPolicy; -import android.support.v7.internal.view.renamemenu.ActionMenuItemView; -import android.support.v7.internal.view.renamemenu.BaseMenuPresenter; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuItemImpl; -import android.support.v7.internal.view.renamemenu.MenuPopupHelper; -import android.support.v7.internal.view.renamemenu.MenuView; -import android.support.v7.internal.view.renamemenu.SubMenuBuilder; import android.support.v7.internal.widget.TintImageView; import android.util.SparseBooleanArray; import android.view.MenuItem; @@ -42,6 +35,13 @@ import android.view.SoundEffectConstants; import android.view.View; import android.view.View.MeasureSpec; import android.view.ViewGroup; +import androidv7.rmenu.ActionMenuItemView; +import androidv7.rmenu.BaseMenuPresenter; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuItemImpl; +import androidv7.rmenu.MenuPopupHelper; +import androidv7.rmenu.MenuView; +import androidv7.rmenu.SubMenuBuilder; import java.util.ArrayList; @@ -87,7 +87,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter } @Override - public void initForMenu(Context context, MenuBuilder menu) { + public void initForMenu(Context context, MBuilder menu) { super.initForMenu(context, menu); final Resources res = context.getResources(); @@ -510,7 +510,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { dismissPopupMenus(); super.onCloseMenu(menu, allMenusAreClosing); } @@ -669,7 +669,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter private class OverflowPopup extends MenuPopupHelper { - public OverflowPopup(Context context, MenuBuilder menu, View anchorView, + public OverflowPopup(Context context, MBuilder menu, View anchorView, boolean overflowOnly) { super(context, menu, anchorView, overflowOnly, R.attr.actionOverflowMenuStyle); setGravity(GravityCompat.END); @@ -723,7 +723,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter private class PopupPresenterCallback implements Callback { @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { if (subMenu == null) return false; mOpenSubMenuId = ((SubMenuBuilder) subMenu).getItem().getItemId(); @@ -732,7 +732,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (menu instanceof SubMenuBuilder) { ((SubMenuBuilder) menu).getRootMenu().close(false); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuView.java b/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuView.java index 811f468186..56df7c8ed5 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuView.java +++ b/eclipse-compile/appcompat/src/android/support/v7/widget/ActionMenuView.java @@ -18,11 +18,6 @@ package android.support.v7.widget; import android.content.Context; import android.content.res.Configuration; import android.os.Build; -import android.support.v7.internal.view.renamemenu.ActionMenuItemView; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuItemImpl; -import android.support.v7.internal.view.renamemenu.MenuPresenter; -import android.support.v7.internal.view.renamemenu.MenuView; import android.support.v7.internal.widget.ViewUtils; import android.util.AttributeSet; import android.view.ContextThemeWrapper; @@ -33,6 +28,11 @@ import android.view.View; import android.view.ViewDebug; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; +import androidv7.rmenu.ActionMenuItemView; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuItemImpl; +import androidv7.rmenu.MenuPresenter; +import androidv7.rmenu.MenuView; /** * ActionMenuView is a presentation of a series of menu options as a View. It provides @@ -40,7 +40,7 @@ import android.view.accessibility.AccessibilityEvent; * items in an overflow menu. This allows applications to present packs of actions inline with * specific or repeating content. */ -public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.ItemInvoker, +public class ActionMenuView extends LinearLayoutCompat implements MBuilder.ItemInvoker, MenuView { private static final String TAG = "ActionMenuView"; @@ -48,7 +48,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It static final int MIN_CELL_SIZE = 56; // dips static final int GENERATED_ITEM_PADDING = 4; // dips - private MenuBuilder mMenu; + private MBuilder mMenu; private Context mContext; @@ -61,7 +61,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It private boolean mReserveOverflow; private ActionMenuPresenter mPresenter; private MenuPresenter.Callback mActionMenuPresenterCallback; - private MenuBuilder.Callback mMenuBuilderCallback; + private MBuilder.Callback mMenuBuilderCallback; private boolean mFormatItems; private int mFormatItemsWidth; private int mMinCellSize; @@ -604,7 +604,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It } /** @hide */ - public void initialize(MenuBuilder menu) { + public void initialize(MBuilder menu) { mMenu = menu; } @@ -619,7 +619,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It public Menu getMenu() { if (mMenu == null) { final Context context = getContext(); - mMenu = new MenuBuilder(context); + mMenu = new MBuilder(context); mMenu.setCallback(new MenuBuilderCallback()); mPresenter = new ActionMenuPresenter(context); mPresenter.setReserveOverflow(true); @@ -636,7 +636,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It * Must be called before the first call to getMenu() * @hide */ - public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) { + public void setMenuCallbacks(MenuPresenter.Callback pcb, MBuilder.Callback mcb) { mActionMenuPresenterCallback = pcb; mMenuBuilderCallback = mcb; } @@ -645,7 +645,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It * Returns the current menu or null if one has not yet been configured. * @hide Internal use only for action bar integration */ - public MenuBuilder peekMenu() { + public MBuilder peekMenu() { return mMenu; } @@ -734,15 +734,15 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It public boolean onMenuItemClick(MenuItem item); } - private class MenuBuilderCallback implements MenuBuilder.Callback { + private class MenuBuilderCallback implements MBuilder.Callback { @Override - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { + public boolean onMenuItemSelected(MBuilder menu, MenuItem item) { return mOnMenuItemClickListener != null && mOnMenuItemClickListener.onMenuItemClick(item); } @Override - public void onMenuModeChange(MenuBuilder menu) { + public void onMenuModeChange(MBuilder menu) { if (mMenuBuilderCallback != null) { mMenuBuilderCallback.onMenuModeChange(menu); } @@ -751,11 +751,11 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It private class ActionMenuPresenterCallback implements ActionMenuPresenter.Callback { @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { } @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { return false; } } diff --git a/eclipse-compile/appcompat/src/android/support/v7/widget/PopupMenu.java b/eclipse-compile/appcompat/src/android/support/v7/widget/PopupMenu.java index 17f22a802a..cd26dd3a76 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/widget/PopupMenu.java +++ b/eclipse-compile/appcompat/src/android/support/v7/widget/PopupMenu.java @@ -21,15 +21,15 @@ import android.content.Context; import android.support.annotation.MenuRes; import android.support.v7.appcompat.R; import android.support.v7.internal.view.SupportMenuInflater; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuPopupHelper; -import android.support.v7.internal.view.renamemenu.MenuPresenter; -import android.support.v7.internal.view.renamemenu.SubMenuBuilder; import android.view.Gravity; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuPopupHelper; +import androidv7.rmenu.MenuPresenter; +import androidv7.rmenu.SubMenuBuilder; /** * Static library support version of the framework's {@link android.widget.PopupMenu}. @@ -38,9 +38,9 @@ import android.view.View; * to switch to the framework's implementation. See the framework SDK * documentation for a class overview. */ -public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { +public class PopupMenu implements MBuilder.Callback, MenuPresenter.Callback { private Context mContext; - private MenuBuilder mMenu; + private MBuilder mMenu; private View mAnchor; private MenuPopupHelper mPopup; private OnMenuItemClickListener mMenuItemClickListener; @@ -105,7 +105,7 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, int popupStyleRes) { mContext = context; - mMenu = new MenuBuilder(context); + mMenu = new MBuilder(context); mMenu.setCallback(this); mAnchor = anchor; mPopup = new MenuPopupHelper(context, mMenu, anchor, false, popupStyleAttr, popupStyleRes); @@ -222,7 +222,7 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { /** * @hide */ - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) { + public boolean onMenuItemSelected(MBuilder menu, MenuItem item) { if (mMenuItemClickListener != null) { return mMenuItemClickListener.onMenuItemClick(item); } @@ -232,7 +232,7 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { /** * @hide */ - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (mDismissListener != null) { mDismissListener.onDismiss(this); } @@ -241,7 +241,7 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { /** * @hide */ - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { if (subMenu == null) return false; if (!subMenu.hasVisibleItems()) { @@ -262,7 +262,7 @@ public class PopupMenu implements MenuBuilder.Callback, MenuPresenter.Callback { /** * @hide */ - public void onMenuModeChange(MenuBuilder menu) { + public void onMenuModeChange(MBuilder menu) { } /** diff --git a/eclipse-compile/appcompat/src/android/support/v7/widget/Toolbar.java b/eclipse-compile/appcompat/src/android/support/v7/widget/Toolbar.java index d5381c892b..2512601d95 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/widget/Toolbar.java +++ b/eclipse-compile/appcompat/src/android/support/v7/widget/Toolbar.java @@ -31,11 +31,6 @@ import android.support.v4.view.ViewCompat; import android.support.v7.app.ActionBar; import android.support.v7.appcompat.R; import android.support.v7.internal.view.SupportMenuInflater; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuItemImpl; -import android.support.v7.internal.view.renamemenu.MenuPresenter; -import android.support.v7.internal.view.renamemenu.MenuView; -import android.support.v7.internal.view.renamemenu.SubMenuBuilder; import android.support.v7.internal.widget.DecorToolbar; import android.support.v7.internal.widget.RtlSpacingHelper; import android.support.v7.internal.widget.TintManager; @@ -57,6 +52,11 @@ import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuItemImpl; +import androidv7.rmenu.MenuPresenter; +import androidv7.rmenu.MenuView; +import androidv7.rmenu.SubMenuBuilder; import java.util.ArrayList; import java.util.List; @@ -171,7 +171,7 @@ public class Toolbar extends ViewGroup { private ActionMenuPresenter mOuterActionMenuPresenter; private ExpandedActionViewMenuPresenter mExpandedMenuPresenter; private MenuPresenter.Callback mActionMenuPresenterCallback; - private MenuBuilder.Callback mMenuBuilderCallback; + private MBuilder.Callback mMenuBuilderCallback; private boolean mCollapsible; private int mMinHeight; @@ -369,13 +369,13 @@ public class Toolbar extends ViewGroup { } /** @hide */ - public void setMenu(MenuBuilder menu, ActionMenuPresenter outerPresenter) { + public void setMenu(MBuilder menu, ActionMenuPresenter outerPresenter) { if (menu == null && mMenuView == null) { return; } ensureMenuView(); - final MenuBuilder oldMenu = mMenuView.peekMenu(); + final MBuilder oldMenu = mMenuView.peekMenu(); if (oldMenu == menu) { return; } @@ -825,7 +825,7 @@ public class Toolbar extends ViewGroup { ensureMenuView(); if (mMenuView.peekMenu() == null) { // Initialize a new menu for the first time. - final MenuBuilder menu = (MenuBuilder) mMenuView.getMenu(); + final MBuilder menu = (MBuilder) mMenuView.getMenu(); if (mExpandedMenuPresenter == null) { mExpandedMenuPresenter = new ExpandedActionViewMenuPresenter(); } @@ -1767,7 +1767,7 @@ public class Toolbar extends ViewGroup { * Must be called before the menu is accessed * @hide */ - public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) { + public void setMenuCallbacks(MenuPresenter.Callback pcb, MBuilder.Callback mcb) { mActionMenuPresenterCallback = pcb; mMenuBuilderCallback = mcb; } @@ -1904,11 +1904,11 @@ public class Toolbar extends ViewGroup { } private class ExpandedActionViewMenuPresenter implements MenuPresenter { - MenuBuilder mMenu; + MBuilder mMenu; MenuItemImpl mCurrentExpandedItem; @Override - public void initForMenu(Context context, MenuBuilder menu) { + public void initForMenu(Context context, MBuilder menu) { // Clear the expanded action view when menus change. if (mMenu != null && mCurrentExpandedItem != null) { mMenu.collapseItemActionView(mCurrentExpandedItem); @@ -1955,7 +1955,7 @@ public class Toolbar extends ViewGroup { } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { } @Override @@ -1964,7 +1964,7 @@ public class Toolbar extends ViewGroup { } @Override - public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean expandItemActionView(MBuilder menu, MenuItemImpl item) { ensureCollapseButtonView(); if (mCollapseButtonView.getParent() != Toolbar.this) { addView(mCollapseButtonView); @@ -1991,7 +1991,7 @@ public class Toolbar extends ViewGroup { } @Override - public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean collapseItemActionView(MBuilder menu, MenuItemImpl item) { // Do this before detaching the actionview from the hierarchy, in case // it needs to dismiss the soft keyboard, etc. if (mExpandedActionView instanceof CollapsibleActionView) { diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ActionMenuItem.java b/eclipse-compile/appcompat/src/androidv7/rmenu/ActionMenuItem.java similarity index 99% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ActionMenuItem.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/ActionMenuItem.java index b23f2a9c53..4734828a65 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ActionMenuItem.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/ActionMenuItem.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.content.Intent; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ActionMenuItemView.java b/eclipse-compile/appcompat/src/androidv7/rmenu/ActionMenuItemView.java similarity index 98% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ActionMenuItemView.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/ActionMenuItemView.java index 534b2a5b91..06ba322251 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ActionMenuItemView.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/ActionMenuItemView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.content.res.Configuration; @@ -52,7 +52,7 @@ public class ActionMenuItemView extends CompatTextView private MenuItemImpl mItemData; private CharSequence mTitle; private Drawable mIcon; - private MenuBuilder.ItemInvoker mItemInvoker; + private MBuilder.ItemInvoker mItemInvoker; private ListPopupWindow.ForwardingListener mForwardingListener; private PopupCallback mPopupCallback; @@ -144,7 +144,7 @@ public class ActionMenuItemView extends CompatTextView } } - public void setItemInvoker(MenuBuilder.ItemInvoker invoker) { + public void setItemInvoker(MBuilder.ItemInvoker invoker) { mItemInvoker = invoker; } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseMenuPresenter.java b/eclipse-compile/appcompat/src/androidv7/rmenu/BaseMenuPresenter.java similarity index 94% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseMenuPresenter.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/BaseMenuPresenter.java index fadb046829..0e9302bfaa 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseMenuPresenter.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/BaseMenuPresenter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.support.v4.view.ViewCompat; @@ -35,7 +35,7 @@ public abstract class BaseMenuPresenter implements MenuPresenter { protected Context mSystemContext; protected Context mContext; - protected MenuBuilder mMenu; + protected MBuilder mMenu; protected LayoutInflater mSystemInflater; protected LayoutInflater mInflater; private Callback mCallback; @@ -62,7 +62,7 @@ public abstract class BaseMenuPresenter implements MenuPresenter { } @Override - public void initForMenu(Context context, MenuBuilder menu) { + public void initForMenu(Context context, MBuilder menu) { mContext = context; mInflater = LayoutInflater.from(mContext); mMenu = menu; @@ -202,7 +202,7 @@ public abstract class BaseMenuPresenter implements MenuPresenter { return true; } - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (mCallback != null) { mCallback.onCloseMenu(menu, allMenusAreClosing); } @@ -219,11 +219,11 @@ public abstract class BaseMenuPresenter implements MenuPresenter { return false; } - public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean expandItemActionView(MBuilder menu, MenuItemImpl item) { return false; } - public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean collapseItemActionView(MBuilder menu, MenuItemImpl item) { return false; } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseMenuWrapper.java b/eclipse-compile/appcompat/src/androidv7/rmenu/BaseMenuWrapper.java similarity index 98% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseMenuWrapper.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/BaseMenuWrapper.java index c4b03001b9..83cef168b1 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseMenuWrapper.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/BaseMenuWrapper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.support.v4.internal.view.SupportMenuItem; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseWrapper.java b/eclipse-compile/appcompat/src/androidv7/rmenu/BaseWrapper.java similarity index 94% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseWrapper.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/BaseWrapper.java index d20164b780..0918a22950 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/BaseWrapper.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/BaseWrapper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; class BaseWrapper { diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ExpandedMenuView.java b/eclipse-compile/appcompat/src/androidv7/rmenu/ExpandedMenuView.java similarity index 88% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ExpandedMenuView.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/ExpandedMenuView.java index 8dab7afe5f..c718fe9606 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ExpandedMenuView.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/ExpandedMenuView.java @@ -14,18 +14,18 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; -import android.support.v7.internal.view.renamemenu.MenuBuilder; -import android.support.v7.internal.view.renamemenu.MenuView; -import android.support.v7.internal.view.renamemenu.MenuBuilder.ItemInvoker; import android.support.v7.internal.widget.TintTypedArray; import android.util.AttributeSet; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; +import androidv7.rmenu.MBuilder; +import androidv7.rmenu.MenuView; +import androidv7.rmenu.MBuilder.ItemInvoker; /** * The expanded menu view is a list-like menu with all of the available menu items. It is opened @@ -41,7 +41,7 @@ public final class ExpandedMenuView extends ListView android.R.attr.divider }; - private MenuBuilder mMenu; + private MBuilder mMenu; /** Default animations for this menu */ private int mAnimations; @@ -66,7 +66,7 @@ public final class ExpandedMenuView extends ListView } @Override - public void initialize(MenuBuilder menu) { + public void initialize(MBuilder menu) { mMenu = menu; } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ListMenuItemView.java b/eclipse-compile/appcompat/src/androidv7/rmenu/ListMenuItemView.java similarity index 99% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ListMenuItemView.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/ListMenuItemView.java index 5bae59cd7c..260e0891a7 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ListMenuItemView.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/ListMenuItemView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.content.res.TypedArray; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ListMenuPresenter.java b/eclipse-compile/appcompat/src/androidv7/rmenu/ListMenuPresenter.java similarity index 95% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ListMenuPresenter.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/ListMenuPresenter.java index 6dce39ef9f..fde65fca9a 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/ListMenuPresenter.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/ListMenuPresenter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.database.DataSetObserver; @@ -42,7 +42,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick Context mContext; LayoutInflater mInflater; - MenuBuilder mMenu; + MBuilder mMenu; ExpandedMenuView mMenuView; @@ -80,7 +80,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick } @Override - public void initForMenu(Context context, MenuBuilder menu) { + public void initForMenu(Context context, MBuilder menu) { if (mThemeRes != 0) { mContext = new ContextThemeWrapper(context, mThemeRes); mInflater = LayoutInflater.from(mContext); @@ -147,7 +147,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (mCallback != null) { mCallback.onCloseMenu(menu, allMenusAreClosing); } @@ -174,11 +174,11 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick return false; } - public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean expandItemActionView(MBuilder menu, MenuItemImpl item) { return false; } - public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean collapseItemActionView(MBuilder menu, MenuItemImpl item) { return false; } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuBuilder.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MBuilder.java similarity index 98% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuBuilder.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MBuilder.java index c7305fdefd..0a1910fa05 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuBuilder.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.ComponentName; import android.content.Context; @@ -51,7 +51,7 @@ import java.util.concurrent.CopyOnWriteArrayList; * * @hide */ -public class MenuBuilder implements SupportMenu { +public class MBuilder implements SupportMenu { private static final String TAG = "MenuBuilder"; @@ -188,14 +188,14 @@ public class MenuBuilder implements SupportMenu { * @param item The menu item that is selected * @return whether the menu item selection was handled */ - public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item); + public boolean onMenuItemSelected(MBuilder menu, MenuItem item); /** * Called when the mode of the menu changes (for example, from icon to expanded). * * @param menu the menu that has changed modes */ - public void onMenuModeChange(MenuBuilder menu); + public void onMenuModeChange(MBuilder menu); } /** @@ -206,7 +206,7 @@ public class MenuBuilder implements SupportMenu { public boolean invokeItem(MenuItemImpl item); } - public MenuBuilder(Context context) { + public MBuilder(Context context) { mContext = context; mResources = context.getResources(); @@ -222,7 +222,7 @@ public class MenuBuilder implements SupportMenu { setShortcutsVisibleInner(true); } - public MenuBuilder setDefaultShowAsAction(int defaultShowAsAction) { + public MBuilder setDefaultShowAsAction(int defaultShowAsAction) { mDefaultShowAsAction = defaultShowAsAction; return this; } @@ -798,7 +798,7 @@ public class MenuBuilder implements SupportMenu { return mContext; } - boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) { + boolean dispatchMenuItemSelected(MBuilder menu, MenuItem item) { return mCallback != null && mCallback.onMenuItemSelected(menu, item); } @@ -862,7 +862,7 @@ public class MenuBuilder implements SupportMenu { for (int i = 0; i < N; i++) { MenuItemImpl item = mItems.get(i); if (item.hasSubMenu()) { - ((MenuBuilder)item.getSubMenu()).findItemsWithShortcutForKey(items, keyCode, event); + ((MBuilder)item.getSubMenu()).findItemsWithShortcutForKey(items, keyCode, event); } final char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut(); if (((metaState & (KeyEvent.META_SHIFT_ON | KeyEvent.META_SYM_ON)) == 0) && @@ -1208,7 +1208,7 @@ public class MenuBuilder implements SupportMenu { * @param title The new title. * @return This MenuBuilder so additional setters can be called. */ - protected MenuBuilder setHeaderTitleInt(CharSequence title) { + protected MBuilder setHeaderTitleInt(CharSequence title) { setHeaderInternal(0, title, 0, null, null); return this; } @@ -1220,7 +1220,7 @@ public class MenuBuilder implements SupportMenu { * @param titleRes The new title (as a resource ID). * @return This MenuBuilder so additional setters can be called. */ - protected MenuBuilder setHeaderTitleInt(int titleRes) { + protected MBuilder setHeaderTitleInt(int titleRes) { setHeaderInternal(titleRes, null, 0, null, null); return this; } @@ -1232,7 +1232,7 @@ public class MenuBuilder implements SupportMenu { * @param icon The new icon. * @return This MenuBuilder so additional setters can be called. */ - protected MenuBuilder setHeaderIconInt(Drawable icon) { + protected MBuilder setHeaderIconInt(Drawable icon) { setHeaderInternal(0, null, 0, icon, null); return this; } @@ -1244,7 +1244,7 @@ public class MenuBuilder implements SupportMenu { * @param iconRes The new icon (as a resource ID). * @return This MenuBuilder so additional setters can be called. */ - protected MenuBuilder setHeaderIconInt(int iconRes) { + protected MBuilder setHeaderIconInt(int iconRes) { setHeaderInternal(0, null, iconRes, null, null); return this; } @@ -1256,7 +1256,7 @@ public class MenuBuilder implements SupportMenu { * @param view The new view. * @return This MenuBuilder so additional setters can be called. */ - protected MenuBuilder setHeaderViewInt(View view) { + protected MBuilder setHeaderViewInt(View view) { setHeaderInternal(0, null, 0, null, view); return this; } @@ -1278,7 +1278,7 @@ public class MenuBuilder implements SupportMenu { * * @return The root menu. */ - public MenuBuilder getRootMenu() { + public MBuilder getRootMenu() { return this; } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuDialogHelper.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuDialogHelper.java similarity index 94% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuDialogHelper.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuDialogHelper.java index 2b5f04865f..eaf21e4ec3 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuDialogHelper.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuDialogHelper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.app.AlertDialog; import android.app.Dialog; @@ -35,12 +35,12 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, MenuPresenter.Callback { - private MenuBuilder mMenu; + private MBuilder mMenu; private AlertDialog mDialog; ListMenuPresenter mPresenter; private MenuPresenter.Callback mPresenterCallback; - public MenuDialogHelper(MenuBuilder menu) { + public MenuDialogHelper(MBuilder menu) { mMenu = menu; } @@ -51,7 +51,7 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, */ public void show(IBinder windowToken) { // Many references to mMenu, create local reference - final MenuBuilder menu = mMenu; + final MBuilder menu = mMenu; // Get the builder for the dialog final AlertDialog.Builder builder = new AlertDialog.Builder(menu.getContext()); @@ -149,7 +149,7 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { if (allMenusAreClosing || menu == mMenu) { dismiss(); } @@ -159,7 +159,7 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, } @Override - public boolean onOpenSubMenu(MenuBuilder subMenu) { + public boolean onOpenSubMenu(MBuilder subMenu) { if (mPresenterCallback != null) { return mPresenterCallback.onOpenSubMenu(subMenu); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemImpl.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemImpl.java similarity index 99% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemImpl.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemImpl.java index 26de7c7b99..38dba90792 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemImpl.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemImpl.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.ActivityNotFoundException; import android.content.Context; @@ -67,7 +67,7 @@ public final class MenuItemImpl implements SupportMenuItem { private int mIconResId = NO_ICON; /** The menu to which this item belongs */ - private MenuBuilder mMenu; + private MBuilder mMenu; /** If this item should launch a sub menu, this is the sub menu to launch */ private SubMenuBuilder mSubMenu; @@ -116,7 +116,7 @@ public final class MenuItemImpl implements SupportMenuItem { * @param categoryOrder The ordering for this item. * @param title The text to display for the item. */ - MenuItemImpl(MenuBuilder menu, int group, int id, int categoryOrder, int ordering, + MenuItemImpl(MBuilder menu, int group, int id, int categoryOrder, int ordering, CharSequence title, int showAsAction) { /*if (sPrependShortcutLabel == null) { diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemWrapperICS.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemWrapperICS.java similarity index 99% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemWrapperICS.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemWrapperICS.java index 8ac355fdf3..451195c991 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemWrapperICS.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemWrapperICS.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.annotation.TargetApi; import android.content.Context; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemWrapperJB.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemWrapperJB.java similarity index 98% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemWrapperJB.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemWrapperJB.java index e1cc932487..115e39043c 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuItemWrapperJB.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuItemWrapperJB.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.annotation.TargetApi; import android.content.Context; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuPopupHelper.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuPopupHelper.java similarity index 93% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuPopupHelper.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuPopupHelper.java index bfe02d6067..050503c93f 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuPopupHelper.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuPopupHelper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.content.res.Resources; @@ -52,7 +52,7 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On private final Context mContext; private final LayoutInflater mInflater; - private final MenuBuilder mMenu; + private final MBuilder mMenu; private final MenuAdapter mAdapter; private final boolean mOverflowOnly; private final int mPopupMaxWidth; @@ -76,20 +76,20 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On private int mDropDownGravity = Gravity.NO_GRAVITY; - public MenuPopupHelper(Context context, MenuBuilder menu) { + public MenuPopupHelper(Context context, MBuilder menu) { this(context, menu, null, false, R.attr.popupMenuStyle); } - public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView) { + public MenuPopupHelper(Context context, MBuilder menu, View anchorView) { this(context, menu, anchorView, false, R.attr.popupMenuStyle); } - public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView, + public MenuPopupHelper(Context context, MBuilder menu, View anchorView, boolean overflowOnly, int popupStyleAttr) { this(context, menu, anchorView, overflowOnly, popupStyleAttr, 0); } - public MenuPopupHelper(Context context, MenuBuilder menu, View anchorView, + public MenuPopupHelper(Context context, MBuilder menu, View anchorView, boolean overflowOnly, int popupStyleAttr, int popupStyleRes) { mContext = context; mInflater = LayoutInflater.from(context); @@ -244,7 +244,7 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On } @Override - public void initForMenu(Context context, MenuBuilder menu) { + public void initForMenu(Context context, MBuilder menu) { // Don't need to do anything; we added as a presenter in the constructor. } @@ -295,7 +295,7 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On } @Override - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) { + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing) { // Only care about the (sub)menu we're presenting. if (menu != mMenu) return; @@ -310,11 +310,11 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On return false; } - public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean expandItemActionView(MBuilder menu, MenuItemImpl item) { return false; } - public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item) { + public boolean collapseItemActionView(MBuilder menu, MenuItemImpl item) { return false; } @@ -333,10 +333,10 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On } private class MenuAdapter extends BaseAdapter { - private MenuBuilder mAdapterMenu; + private MBuilder mAdapterMenu; private int mExpandedIndex = -1; - public MenuAdapter(MenuBuilder menu) { + public MenuAdapter(MBuilder menu) { mAdapterMenu = menu; findExpandedIndex(); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuPresenter.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuPresenter.java similarity index 88% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuPresenter.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuPresenter.java index 2496ed5df7..359b9aed3a 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuPresenter.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuPresenter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.os.Parcelable; @@ -39,7 +39,7 @@ public interface MenuPresenter { * @param menu * @param allMenusAreClosing */ - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing); /** * Called when a submenu opens. Useful for notifying the application @@ -50,22 +50,22 @@ public interface MenuPresenter { * @return true if the Callback will handle presenting the submenu, false if * the presenter should attempt to do so. */ - public boolean onOpenSubMenu(MenuBuilder subMenu); + public boolean onOpenSubMenu(MBuilder subMenu); } /** * Initialize this presenter for the given context and menu. * This method is called by MenuBuilder when a presenter is - * added. See {@link MenuBuilder#addMenuPresenter(MenuPresenter)} + * added. See {@link MBuilder#addMenuPresenter(MenuPresenter)} * * @param context Context for this presenter; used for view creation and resource management * @param menu Menu to host */ - public void initForMenu(Context context, MenuBuilder menu); + public void initForMenu(Context context, MBuilder menu); /** * Retrieve a MenuView to display the menu specified in - * {@link #initForMenu(Context, MenuBuilder)}. + * {@link #initForMenu(Context, MBuilder)}. * * @param root Intended parent of the MenuView. * @return A freshly created MenuView. @@ -105,7 +105,7 @@ public interface MenuPresenter { * @param menu Menu or submenu that is closing. * @param allMenusAreClosing True if all associated menus are closing. */ - public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing); + public void onCloseMenu(MBuilder menu, boolean allMenusAreClosing); /** * Called by Menu implementations to flag items that will be shown as actions. @@ -120,7 +120,7 @@ public interface MenuPresenter { * @param item Item to be expanded * @return true if this presenter expanded the action view, false otherwise. */ - public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item); + public boolean expandItemActionView(MBuilder menu, MenuItemImpl item); /** * Called when a menu item with a collapsable action view should collapse its action view. @@ -129,7 +129,7 @@ public interface MenuPresenter { * @param item Item to be collapsed * @return true if this presenter collapsed the action view, false otherwise. */ - public boolean collapseItemActionView(MenuBuilder menu, MenuItemImpl item); + public boolean collapseItemActionView(MBuilder menu, MenuItemImpl item); /** * Returns an ID for determining how to save/restore instance state. diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuView.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuView.java similarity index 92% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuView.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuView.java index 8a4052b03e..eb2713bfeb 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuView.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuView.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.graphics.drawable.Drawable; /** - * Minimal interface for a menu view. {@link #initialize(MenuBuilder)} must be called for the + * Minimal interface for a menu view. {@link #initialize(MBuilder)} must be called for the * menu to be functional. * * @hide @@ -31,7 +31,7 @@ public interface MenuView { * * @param menu The menu that this MenuView should display. */ - public void initialize(MenuBuilder menu); + public void initialize(MBuilder menu); /** * Returns the default animations to be used for this menu when entering/exiting. @@ -49,8 +49,8 @@ public interface MenuView { * inflated. * @param itemData The item that this ItemView should display. * @param menuType The type of this menu, one of - * {@link MenuBuilder#TYPE_ICON}, {@link MenuBuilder#TYPE_EXPANDED}, - * {@link MenuBuilder#TYPE_DIALOG}). + * {@link MBuilder#TYPE_ICON}, {@link MBuilder#TYPE_EXPANDED}, + * {@link MBuilder#TYPE_DIALOG}). */ public void initialize(MenuItemImpl itemData, int menuType); diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuWrapperFactory.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuWrapperFactory.java similarity index 97% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuWrapperFactory.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuWrapperFactory.java index ae681eb108..f2bbdc5515 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuWrapperFactory.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuWrapperFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.os.Build; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuWrapperICS.java b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuWrapperICS.java similarity index 98% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuWrapperICS.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/MenuWrapperICS.java index 863be3e545..23e64c0574 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/MenuWrapperICS.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/MenuWrapperICS.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.ComponentName; import android.content.Context; diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/SubMenuBuilder.java b/eclipse-compile/appcompat/src/androidv7/rmenu/SubMenuBuilder.java similarity index 90% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/SubMenuBuilder.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/SubMenuBuilder.java index cae726330a..145c709d2a 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/SubMenuBuilder.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/SubMenuBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.graphics.drawable.Drawable; @@ -30,11 +30,11 @@ import android.view.View; * * @hide */ -public class SubMenuBuilder extends MenuBuilder implements SubMenu { - private MenuBuilder mParentMenu; +public class SubMenuBuilder extends MBuilder implements SubMenu { + private MBuilder mParentMenu; private MenuItemImpl mItem; - public SubMenuBuilder(Context context, MenuBuilder parentMenu, MenuItemImpl item) { + public SubMenuBuilder(Context context, MBuilder parentMenu, MenuItemImpl item) { super(context); mParentMenu = parentMenu; @@ -75,12 +75,12 @@ public class SubMenuBuilder extends MenuBuilder implements SubMenu { } @Override - public MenuBuilder getRootMenu() { + public MBuilder getRootMenu() { return mParentMenu; } @Override - boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) { + boolean dispatchMenuItemSelected(MBuilder menu, MenuItem item) { return super.dispatchMenuItemSelected(menu, item) || mParentMenu.dispatchMenuItemSelected(menu, item); } diff --git a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/SubMenuWrapperICS.java b/eclipse-compile/appcompat/src/androidv7/rmenu/SubMenuWrapperICS.java similarity index 97% rename from eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/SubMenuWrapperICS.java rename to eclipse-compile/appcompat/src/androidv7/rmenu/SubMenuWrapperICS.java index cdf3451984..0e98b9a7f5 100644 --- a/eclipse-compile/appcompat/src/android/support/v7/internal/view/renamemenu/SubMenuWrapperICS.java +++ b/eclipse-compile/appcompat/src/androidv7/rmenu/SubMenuWrapperICS.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.support.v7.internal.view.renamemenu; +package androidv7.rmenu; import android.content.Context; import android.graphics.drawable.Drawable;