MenuBuilder.java revision b17b7b75ce2989f50a12ef00f198276e30b9c780
1bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell// Copyright 2012 Google Inc. All Rights Reserved. 2bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 3bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellpackage android.support.appcompat.view.menu; 4bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 5bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.support.appcompat.view.Menu; 6bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 7bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.content.ComponentName; 8bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.content.Context; 9bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.content.Intent; 10bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.graphics.drawable.Drawable; 11bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.support.appcompat.view.MenuItem; 12bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.support.appcompat.view.SubMenu; 13bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.view.KeyEvent; 14bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport android.view.View; 15bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 16bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellimport java.util.ArrayList; 17bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 18bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell/** 19bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell * @author trevorjohns@google.com (Trevor Johns) 20bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell */ 21bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powellpublic class MenuBuilder implements Menu { 22bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 23bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void flagActionItems() { 24bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 25bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 26bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public ArrayList<MenuItemImpl> getVisibleItems() { 27bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of created methods use File | Settings | File Templates. 28bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 29bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 30bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public ArrayList<MenuItemImpl> getActionItems() { 31bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of created methods use File | Settings | File Templates. 32bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 33bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 34bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public ArrayList<MenuItemImpl> getNonActionItems() { 35bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of created methods use File | Settings | File Templates. 36bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 37bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 38bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void addMenuPresenter(MenuPresenter presenter) { 39bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of created methods use File | Settings | File Templates. 40bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 41bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 42bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItemImpl getExpandedItem() { 43bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of created methods use File | Settings | File Templates. 44bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 45bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 46bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void close(boolean b) { 47bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 48bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 49bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void changeMenuMode() { 50bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of created methods use File | Settings | File Templates. 51bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 52bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 53bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell /** 54bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell * Called by menu items to execute their associated action 55bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell */ 56bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public interface ItemInvoker { 57bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean invokeItem(MenuItemImpl item); 58bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 59bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 60bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuBuilder(Context themedContext) { 61bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 62bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 63bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 64bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItem add(CharSequence charSequence) { 65bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 66bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 67bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 68bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 69bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItem add(int i) { 70bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 71bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 72bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 73bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 74bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItem add(int i, int i1, int i2, CharSequence charSequence) { 75bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 76bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 77bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 78bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 79bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItem add(int i, int i1, int i2, int i3) { 80bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 81bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 82bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 83bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 84bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public SubMenu addSubMenu(CharSequence charSequence) { 85bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 86bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 87bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 88bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 89bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public SubMenu addSubMenu(int i) { 90bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 91bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 92bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 93bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 94bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public SubMenu addSubMenu(int i, int i1, int i2, CharSequence charSequence) { 95bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 96bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 97bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 98bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 99bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public SubMenu addSubMenu(int i, int i1, int i2, int i3) { 100bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 101bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 102bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 103bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 104bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public int addIntentOptions(int i, int i1, int i2, ComponentName componentName, Intent[] intents, 105bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell Intent intent, int i3, MenuItem[] menuItems) { 106bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return 0; //To change body of implemented methods use File | Settings | File Templates. 107bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 108bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 109bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 110bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void removeItem(int i) { 111bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 112bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 113bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 114bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 115bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void removeGroup(int i) { 116bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 117bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 118bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 119bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 120bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void clear() { 121bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 122bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 123bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 124bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 125bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setGroupCheckable(int i, boolean b, boolean b1) { 126bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 127bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 128bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 129bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 130bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setGroupVisible(int i, boolean b) { 131bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 132bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 133bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 134bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 135bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setGroupEnabled(int i, boolean b) { 136bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 137bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 138bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 139bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 140bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean hasVisibleItems() { 141bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 142bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 143bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 144bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 145bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItem findItem(int i) { 146bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 147bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 148bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 149bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 150bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public int size() { 151bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return 0; //To change body of implemented methods use File | Settings | File Templates. 152bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 153bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 154bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 155bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuItem getItem(int i) { 156bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 157bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 158bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 159bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 160bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void close() { 161bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 162bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 163bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 164bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 165bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean performShortcut(int i, KeyEvent keyEvent, int i1) { 166bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 167bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 168bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 169bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 170bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean isShortcutKey(int i, KeyEvent keyEvent) { 171bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 172bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 173bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 174bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 175bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean performIdentifierAction(int i, int i1) { 176bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 177bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 178bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 179bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell @Override 180bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setQwertyMode(boolean b) { 181bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of implemented methods use File | Settings | File Templates. 182bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 183bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 184bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public MenuBuilder setDefaultShowAsAction(int showAsActionIfRoom) { 185bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; 186bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 187bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 188b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns public void setCallback(Callback actionMode) { 189bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 190bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 191bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void startDispatchingItemsChanged() { 192bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 193bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 194bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void stopDispatchingItemsChanged() { 195bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell //To change body of created methods use File | Settings | File Templates. 196bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 197bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 198bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean isQwertyMode() { 199bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 200bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 201bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 202bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setShortcutsVisible(boolean shortcutsVisible) { 203bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 204bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 205bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean isShortcutsVisible() { 206bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 207bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 208bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 209bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean dispatchMenuItemSelected(MenuBuilder menu, MenuItem item) { 210bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 211bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 212bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 213bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setHeaderIconInt(Drawable icon) { 214bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 215bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 216bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setHeaderTitleInt(CharSequence title) { 217bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 218bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 219bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void setHeaderViewInt(View view) { 220bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 221bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 222bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean expandItemActionView(MenuItemImpl item) { 223bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 224bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 225bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 226bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean collapseItemActionView(MenuItemImpl item) { 227bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 228bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 229bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 230bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public String getActionViewStatesKey() { 231bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of implemented methods use File | Settings | File Templates. 232bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 233bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 234bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean getOptionalIconsVisible() { 235bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of implemented methods use File | Settings | File Templates. 236bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 237bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 238bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public Context getContext() { 239bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return null; //To change body of created methods use File | Settings | File Templates. 240bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 241bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 242bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public void onItemsChanged(boolean b) { 243bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 244bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell 245bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell public boolean performItemAction(MenuItemImpl item, int i) { 246bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell return false; //To change body of created methods use File | Settings | File Templates. 247bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell } 248b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns 249b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns /** 250b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * Called by menu to notify of close and selection changes. 251b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns */ 252b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns public interface Callback { 253b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns /** 254b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * Called when a menu item is selected. 255b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * @param menu The menu that is the parent of the item 256b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * @param item The menu item that is selected 257b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * @return whether the menu item selection was handled 258b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns */ 259b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item); 260b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns 261b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns /** 262b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * Called when the mode of the menu changes (for example, from icon to expanded). 263b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * 264b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns * @param menu the menu that has changed modes 265b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns */ 266b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns public void onMenuModeChange(MenuBuilder menu); 267b17b7b75ce2989f50a12ef00f198276e30b9c780Trevor Johns } 268bbbb8f39d1b1d1b317c5f9237f20fe6b1d9eb17fAdam Powell} 269