API changes
This commit is contained in:
@@ -1,234 +0,0 @@
|
||||
package com.actionbarsherlock.internal.view.menu;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.ActionProvider;
|
||||
import android.view.MenuItem;
|
||||
import android.view.SubMenu;
|
||||
import android.view.View;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
|
||||
/** Used to carry an instance of our version of MenuItem through a native channel. */
|
||||
public class MenuItemMule implements MenuItem {
|
||||
private static final String ERROR = "Cannot interact with object designed for temporary "
|
||||
+ "instance passing. Make sure you using both SherlockFragmentActivity and "
|
||||
+ "SherlockFragment.";
|
||||
|
||||
|
||||
private final com.actionbarsherlock.view.MenuItem mItem;
|
||||
|
||||
public MenuItemMule(com.actionbarsherlock.view.MenuItem item) {
|
||||
mItem = item;
|
||||
}
|
||||
|
||||
public com.actionbarsherlock.view.MenuItem unwrap() {
|
||||
return mItem;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean collapseActionView() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean expandActionView() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionProvider getActionProvider() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getActionView() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public char getAlphabeticShortcut() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGroupId() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Drawable getIcon() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent getIntent() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemId() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContextMenuInfo getMenuInfo() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public char getNumericShortcut() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubMenu getSubMenu() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getTitle() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getTitleCondensed() {
|
||||
return mItem.getTitleCondensed();
|
||||
//throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSubMenu() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActionViewExpanded() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCheckable() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setActionProvider(ActionProvider arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setActionView(View arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setActionView(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setAlphabeticShortcut(char arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setCheckable(boolean arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setChecked(boolean arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setEnabled(boolean arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setIcon(Drawable arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setIcon(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setIntent(Intent arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setNumericShortcut(char arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setOnActionExpandListener(OnActionExpandListener arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setShortcut(char arg0, char arg1) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShowAsAction(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setShowAsActionFlags(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setTitle(CharSequence arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setTitle(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setTitleCondensed(CharSequence arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setVisible(boolean arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
package com.actionbarsherlock.internal.view.menu;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.SubMenu;
|
||||
|
||||
/** Used to carry an instance of our version of Menu through a native channel. */
|
||||
public class MenuMule implements Menu {
|
||||
private static final String ERROR = "Cannot interact with object designed for temporary "
|
||||
+ "instance passing. Make sure you using both SherlockFragmentActivity and "
|
||||
+ "SherlockFragment.";
|
||||
|
||||
|
||||
private final com.actionbarsherlock.view.Menu mMenu;
|
||||
public boolean mDispatchShow = false;
|
||||
|
||||
public MenuMule(com.actionbarsherlock.view.Menu menu) {
|
||||
mMenu = menu;
|
||||
}
|
||||
|
||||
public com.actionbarsherlock.view.Menu unwrap() {
|
||||
return mMenu;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MenuItem add(CharSequence arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem add(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem add(int arg0, int arg1, int arg2, CharSequence arg3) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem add(int arg0, int arg1, int arg2, int arg3) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addIntentOptions(int arg0, int arg1, int arg2,
|
||||
ComponentName arg3, Intent[] arg4, Intent arg5, int arg6,
|
||||
MenuItem[] arg7) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubMenu addSubMenu(CharSequence arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubMenu addSubMenu(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubMenu addSubMenu(int arg0, int arg1, int arg2, CharSequence arg3) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubMenu addSubMenu(int arg0, int arg1, int arg2, int arg3) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem findItem(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem getItem(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasVisibleItems() {
|
||||
return mMenu.hasVisibleItems();
|
||||
//throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShortcutKey(int arg0, KeyEvent arg1) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performIdentifierAction(int arg0, int arg1) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performShortcut(int arg0, KeyEvent arg1, int arg2) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeGroup(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeItem(int arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGroupCheckable(int arg0, boolean arg1, boolean arg2) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGroupEnabled(int arg0, boolean arg1) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGroupVisible(int arg0, boolean arg1) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQwertyMode(boolean arg0) {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
throw new IllegalStateException(ERROR);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user