public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBuilder.Callback, Window.Callback, MenuPresenter.Callback, android.view.MenuItem.OnMenuItemClickListener
ActionBarSherlock.Implementation, ActionBarSherlock.OnActionModeFinishedListener, ActionBarSherlock.OnActionModeStartedListener, ActionBarSherlock.OnCreateOptionsMenuListener, ActionBarSherlock.OnCreatePanelMenuListener, ActionBarSherlock.OnMenuItemSelectedListener, ActionBarSherlock.OnOptionsItemSelectedListener, ActionBarSherlock.OnPrepareOptionsMenuListener, ActionBarSherlock.OnPreparePanelListener| Modifier and Type | Field and Description | 
|---|---|
protected static int | 
DEFAULT_FEATURES
Window features which are enabled by default. 
 | 
protected HashMap<android.view.MenuItem,MenuItemImpl> | 
mNativeItemMap
Map between native options items and sherlock items. 
 | 
DEBUG, FLAG_DELEGATE, mActivity, mIsDelegate, mMenuInflater, TAG| Constructor and Description | 
|---|
ActionBarSherlockCompat(android.app.Activity activity,
                       int flags)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addContentView(android.view.View view,
              android.view.ViewGroup.LayoutParams params)
Variation on  
ActionBarSherlock.setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
 to add an additional content view to the screen. | 
static String | 
cleanActivityName(String manifestPackage,
                 String activityName)  | 
boolean | 
dispatchCloseOptionsMenu()
Notify the action bar that it should close its overflow menu if it is
 appropriate for the device. 
 | 
void | 
dispatchConfigurationChanged(android.content.res.Configuration newConfig)
Notify action bar of a configuration change event. 
 | 
boolean | 
dispatchCreateOptionsMenu(android.view.Menu menu)
Notify the action bar that the Activity has triggered a menu creation
 which should happen on the conclusion of  
Activity.onCreate(android.os.Bundle). | 
void | 
dispatchDestroy()
Notify the action bar that the activity has been destroyed. 
 | 
void | 
dispatchInvalidateOptionsMenu()
Indicate that the menu should be recreated by calling
  
ActionBarSherlock.OnCreateOptionsMenuListener.onCreateOptionsMenu(com.actionbarsherlock.view.Menu). | 
boolean | 
dispatchKeyEvent(android.view.KeyEvent event)
Notify the action bar the user has created a key event. 
 | 
boolean | 
dispatchMenuOpened(int featureId,
                  android.view.Menu menu)
Notify the action bar that the overflow menu has been opened. 
 | 
boolean | 
dispatchOpenOptionsMenu()
Notify the action bar that it should display its overflow menu if it is
 appropriate for the device. 
 | 
boolean | 
dispatchOptionsItemSelected(android.view.MenuItem item)
Notify the action bar that a native options menu item has been selected. 
 | 
void | 
dispatchPanelClosed(int featureId,
                   android.view.Menu menu)
Notify the action bar that the overflow menu has been closed. 
 | 
void | 
dispatchPause()
Notify the action bar that the activity is pausing. 
 | 
void | 
dispatchPostCreate(android.os.Bundle savedInstanceState)
Notify the class that the activity has finished its creation. 
 | 
void | 
dispatchPostResume()
Notify the action bar that the activity has finished its resuming. 
 | 
boolean | 
dispatchPrepareOptionsMenu(android.view.Menu menu)
Notify the action bar that the Activity has triggered a menu preparation
 which usually means that the user has requested the overflow menu via a
 hardware menu key. 
 | 
void | 
dispatchStop()
Notify the action bar that the activity is stopping. 
 | 
void | 
dispatchTitleChanged(CharSequence title,
                    int color)
Notify the action bar that the title has changed and the action bar
 should be updated to reflect the change. 
 | 
ActionBar | 
getActionBar()
Get the current action bar instance. 
 | 
protected android.content.Context | 
getThemedContext()  | 
boolean | 
hasFeature(int featureId)
Query for the availability of a certain feature. 
 | 
void | 
onCloseMenu(MenuBuilder menu,
           boolean allMenusAreClosing)
Called when a menu is closing. 
 | 
boolean | 
onMenuItemClick(android.view.MenuItem item)  | 
boolean | 
onMenuItemSelected(int featureId,
                  MenuItem item)
Called when a panel's menu item has been selected by the user. 
 | 
boolean | 
onMenuItemSelected(MenuBuilder menu,
                  MenuItem item)
Called when a menu item is selected. 
 | 
void | 
onMenuModeChange(MenuBuilder menu)
Called when the mode of the menu changes (for example, from icon to expanded). 
 | 
boolean | 
onOpenSubMenu(MenuBuilder subMenu)
Called when a submenu opens. 
 | 
boolean | 
requestFeature(int featureId)
Enable extended screen features. 
 | 
void | 
setContentView(int layoutResId)
Set the content of the activity inside the action bar. 
 | 
void | 
setContentView(android.view.View view,
              android.view.ViewGroup.LayoutParams params)
Set the content of the activity inside the action bar. 
 | 
void | 
setProgress(int progress)
Sets the progress for the progress bars in the title. 
 | 
void | 
setProgressBarIndeterminate(boolean indeterminate)
Sets whether the horizontal progress bar in the title should be indeterminate (the circular
 is always indeterminate). 
 | 
void | 
setProgressBarIndeterminateVisibility(boolean visible)
Sets the visibility of the indeterminate progress bar in the title. 
 | 
void | 
setProgressBarVisibility(boolean visible)
Sets the visibility of the progress bar in the title. 
 | 
void | 
setSecondaryProgress(int secondaryProgress)
Sets the secondary progress for the progress bar in the title. 
 | 
void | 
setTitle(CharSequence title)
Change the title associated with this activity. 
 | 
void | 
setUiOptions(int uiOptions)
Set extra options that will influence the UI for this window. 
 | 
void | 
setUiOptions(int uiOptions,
            int mask)
Set extra options that will influence the UI for this window. 
 | 
ActionMode | 
startActionMode(ActionMode.Callback callback)
Start an action mode. 
 | 
callbackCreateOptionsMenu, callbackOptionsItemSelected, callbackPrepareOptionsMenu, getMenuInflater, registerImplementation, setContentView, setTitle, unregisterImplementation, wrap, wrapprotected static final int DEFAULT_FEATURES
protected HashMap<android.view.MenuItem,MenuItemImpl> mNativeItemMap
public ActionBarSherlockCompat(android.app.Activity activity,
                               int flags)
public ActionBar getActionBar()
ActionBarSherlockgetActionBar in class ActionBarSherlockprotected android.content.Context getThemedContext()
getThemedContext in class ActionBarSherlockpublic void setTitle(CharSequence title)
ActionBarSherlocksetTitle in class ActionBarSherlockpublic ActionMode startActionMode(ActionMode.Callback callback)
ActionBarSherlockstartActionMode in class ActionBarSherlockcallback - Callback that will manage lifecycle events for this
                 context mode.ActionModepublic void dispatchConfigurationChanged(android.content.res.Configuration newConfig)
ActionBarSherlockdispatchConfigurationChanged in class ActionBarSherlocknewConfig - The new device configuration.public void dispatchPostResume()
ActionBarSherlockdispatchPostResume in class ActionBarSherlockpublic void dispatchPause()
ActionBarSherlockdispatchPause in class ActionBarSherlockpublic void dispatchStop()
ActionBarSherlockdispatchStop in class ActionBarSherlockpublic void dispatchInvalidateOptionsMenu()
ActionBarSherlockActionBarSherlock.OnCreateOptionsMenuListener.onCreateOptionsMenu(com.actionbarsherlock.view.Menu).dispatchInvalidateOptionsMenu in class ActionBarSherlockpublic boolean dispatchOpenOptionsMenu()
ActionBarSherlockfalse.
 dispatchOpenOptionsMenu in class ActionBarSherlocktrue if the opening of the menu was handled internally.public boolean dispatchCloseOptionsMenu()
ActionBarSherlockfalse.
 dispatchCloseOptionsMenu in class ActionBarSherlocktrue if the closing of the menu was handled internally.public void dispatchPostCreate(android.os.Bundle savedInstanceState)
ActionBarSherlockdispatchPostCreate in class ActionBarSherlocksavedInstanceState - If the activity is being re-initialized after
                           previously being shut down then this Bundle
                           contains the data it most recently supplied in
                           Activity#onSaveInstanceState(Bundle)}.
                           Note: Otherwise it is null.public boolean dispatchCreateOptionsMenu(android.view.Menu menu)
ActionBarSherlockActivity.onCreate(android.os.Bundle). This
 will be used to gain a reference to the native menu for native and
 overflow binding as well as to indicate when compatibility create should
 occur for the first time.dispatchCreateOptionsMenu in class ActionBarSherlockmenu - Activity native menu.true since we always want to say that we have a nativepublic boolean dispatchPrepareOptionsMenu(android.view.Menu menu)
ActionBarSherlockdispatchPrepareOptionsMenu in class ActionBarSherlockmenu - Activity native menu.true if menu display should proceed.public boolean dispatchOptionsItemSelected(android.view.MenuItem item)
ActionBarSherlockdispatchOptionsItemSelected in class ActionBarSherlockitem - Options menu item.public boolean dispatchMenuOpened(int featureId,
                                  android.view.Menu menu)
ActionBarSherlocktrue if this method
 returns true, otherwise return the result of the superclass
 method.
 dispatchMenuOpened in class ActionBarSherlockfeatureId - Window feature which triggered the event.menu - Activity native menu.true if the event was handled by this method.public void dispatchPanelClosed(int featureId,
                                android.view.Menu menu)
ActionBarSherlockdispatchPanelClosed in class ActionBarSherlockpublic void dispatchTitleChanged(CharSequence title, int color)
ActionBarSherlockdispatchTitleChanged in class ActionBarSherlocktitle - New activity title.color - New activity color.public boolean dispatchKeyEvent(android.view.KeyEvent event)
ActionBarSherlockdispatchKeyEvent in class ActionBarSherlockevent - Description of the key event.true if the event was handled.public void dispatchDestroy()
ActionBarSherlockdispatchDestroy in class ActionBarSherlockpublic boolean onMenuItemSelected(MenuBuilder menu, MenuItem item)
MenuBuilder.CallbackonMenuItemSelected in interface MenuBuilder.Callbackmenu - The menu that is the parent of the itemitem - The menu item that is selectedpublic void onMenuModeChange(MenuBuilder menu)
MenuBuilder.CallbackonMenuModeChange in interface MenuBuilder.Callbackmenu - the menu that has changed modespublic boolean onOpenSubMenu(MenuBuilder subMenu)
MenuPresenter.CallbackonOpenSubMenu in interface MenuPresenter.CallbacksubMenu - Submenu currently being openedpublic void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing)
MenuPresenter.CallbackonCloseMenu in interface MenuPresenter.Callbackpublic boolean onMenuItemClick(android.view.MenuItem item)
onMenuItemClick in interface android.view.MenuItem.OnMenuItemClickListenerpublic boolean onMenuItemSelected(int featureId,
                                  MenuItem item)
Window.CallbackonMenuItemSelected in interface Window.CallbackfeatureId - The panel that the menu is in.item - The menu item that was selected.public void setProgressBarVisibility(boolean visible)
ActionBarSherlock
 In order for the progress bar to be shown, the feature must be requested
 via #requestWindowFeature(int).
setProgressBarVisibility in class ActionBarSherlockvisible - Whether to show the progress bars in the title.public void setProgressBarIndeterminateVisibility(boolean visible)
ActionBarSherlock
 In order for the progress bar to be shown, the feature must be requested
 via #requestWindowFeature(int).
setProgressBarIndeterminateVisibility in class ActionBarSherlockvisible - Whether to show the progress bars in the title.public void setProgressBarIndeterminate(boolean indeterminate)
ActionBarSherlock
 In order for the progress bar to be shown, the feature must be requested
 via #requestWindowFeature(int).
setProgressBarIndeterminate in class ActionBarSherlockindeterminate - Whether the horizontal progress bar should be indeterminate.public void setProgress(int progress)
ActionBarSherlock
 In order for the progress bar to be shown, the feature must be requested
 via #requestWindowFeature(int).
setProgress in class ActionBarSherlockprogress - The progress for the progress bar. Valid ranges are from
            0 to 10000 (both inclusive). If 10000 is given, the progress
            bar will be completely filled and will fade out.public void setSecondaryProgress(int secondaryProgress)
ActionBarSherlockActionBarSherlock.setProgress(int) and the background. It can be ideal for media
 scenarios such as showing the buffering progress while the default
 progress shows the play progress.
 
 In order for the progress bar to be shown, the feature must be requested
 via #requestWindowFeature(int).
setSecondaryProgress in class ActionBarSherlocksecondaryProgress - The secondary progress for the progress bar. Valid ranges are from
            0 to 10000 (both inclusive).public boolean hasFeature(int featureId)
ActionBarSherlockhasFeature in class ActionBarSherlockfeatureId - The feature ID to check.true if feature is enabled, false otherwise.public boolean requestFeature(int featureId)
ActionBarSherlocksetContentView(). May be called as many times as desired as long
 as it is before setContentView(). If not called, no extended
 features will be available. You can not turn off a feature once it is
 requested.requestFeature in class ActionBarSherlockfeatureId - The desired features, defined as constants by Window.public void setUiOptions(int uiOptions)
ActionBarSherlocksetUiOptions in class ActionBarSherlockuiOptions - Flags specifying extra options for this window.public void setUiOptions(int uiOptions,
                         int mask)
ActionBarSherlocksetUiOptions in class ActionBarSherlockuiOptions - Flags specifying extra options for this window.mask - Flags specifying which options should be modified. Others
             will remain unchanged.public void setContentView(int layoutResId)
ActionBarSherlocksetContentView in class ActionBarSherlocklayoutResId - Layout resource ID.public void setContentView(android.view.View view,
                           android.view.ViewGroup.LayoutParams params)
ActionBarSherlocksetContentView in class ActionBarSherlockview - The desired content to display.params - Layout parameters to apply to the view.public void addContentView(android.view.View view,
                           android.view.ViewGroup.LayoutParams params)
ActionBarSherlockActionBarSherlock.setContentView(android.view.View, android.view.ViewGroup.LayoutParams)
 to add an additional content view to the screen. Added after any
 existing ones on the screen -- existing views are NOT removed.addContentView in class ActionBarSherlockview - The desired content to display.params - Layout parameters for the view.Copyright © 2011–2014. All rights reserved.