Back to project page ActionBarTest.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Defi...
If you think the Android project ActionBarTest listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.actionbarsherlock.internal.view.menu; /*from w w w . j a va 2 s . c o m*/ import android.graphics.drawable.Drawable; import android.view.View; import com.actionbarsherlock.view.MenuItem; import com.actionbarsherlock.view.SubMenu; public class SubMenuWrapper extends MenuWrapper implements SubMenu { private final android.view.SubMenu mNativeSubMenu; private MenuItem mItem = null; public SubMenuWrapper(android.view.SubMenu nativeSubMenu) { super(nativeSubMenu); mNativeSubMenu = nativeSubMenu; } @Override public SubMenu setHeaderTitle(int titleRes) { mNativeSubMenu.setHeaderTitle(titleRes); return this; } @Override public SubMenu setHeaderTitle(CharSequence title) { mNativeSubMenu.setHeaderTitle(title); return this; } @Override public SubMenu setHeaderIcon(int iconRes) { mNativeSubMenu.setHeaderIcon(iconRes); return this; } @Override public SubMenu setHeaderIcon(Drawable icon) { mNativeSubMenu.setHeaderIcon(icon); return this; } @Override public SubMenu setHeaderView(View view) { mNativeSubMenu.setHeaderView(view); return this; } @Override public void clearHeader() { mNativeSubMenu.clearHeader(); } @Override public SubMenu setIcon(int iconRes) { mNativeSubMenu.setIcon(iconRes); return this; } @Override public SubMenu setIcon(Drawable icon) { mNativeSubMenu.setIcon(icon); return this; } @Override public MenuItem getItem() { if (mItem == null) { mItem = new MenuItemWrapper(mNativeSubMenu.getItem()); } return mItem; } }