com.actionbarsherlock.internal
Class ActionBarSherlockNative

java.lang.Object
  extended by com.actionbarsherlock.ActionBarSherlock
      extended by com.actionbarsherlock.internal.ActionBarSherlockNative

public class ActionBarSherlockNative
extends ActionBarSherlock


Nested Class Summary
 
Nested classes/interfaces inherited from class com.actionbarsherlock.ActionBarSherlock
ActionBarSherlock.Implementation, ActionBarSherlock.OnActionModeFinishedListener, ActionBarSherlock.OnActionModeStartedListener, ActionBarSherlock.OnCreateOptionsMenuListener, ActionBarSherlock.OnCreatePanelMenuListener, ActionBarSherlock.OnMenuItemSelectedListener, ActionBarSherlock.OnOptionsItemSelectedListener, ActionBarSherlock.OnPrepareOptionsMenuListener, ActionBarSherlock.OnPreparePanelListener
 
Field Summary
 
Fields inherited from class com.actionbarsherlock.ActionBarSherlock
FLAG_DELEGATE, mActivity, mIsDelegate, mMenuInflater, TAG
 
Constructor Summary
ActionBarSherlockNative(android.app.Activity activity, int flags)
           
 
Method Summary
 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.
 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 dispatchInvalidateOptionsMenu()
          Indicate that the menu should be recreated by calling ActionBarSherlock.OnCreateOptionsMenuListener.onCreateOptionsMenu(com.actionbarsherlock.view.Menu).
 boolean dispatchOptionsItemSelected(android.view.MenuItem item)
          Notify the action bar that a native options menu item has been selected.
 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.
 ActionBar getActionBar()
          Get the current action bar instance.
protected  android.content.Context getThemedContext()
           
 boolean hasFeature(int feature)
          Query for the availability of a certain feature.
 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.
 
Methods inherited from class com.actionbarsherlock.ActionBarSherlock
callbackCreateOptionsMenu, callbackOptionsItemSelected, callbackPrepareOptionsMenu, dispatchCloseOptionsMenu, dispatchConfigurationChanged, dispatchDestroy, dispatchKeyEvent, dispatchMenuOpened, dispatchOpenOptionsMenu, dispatchPanelClosed, dispatchPause, dispatchPostCreate, dispatchPostResume, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchStop, dispatchTitleChanged, ensureActionBar, getMenuInflater, registerImplementation, setContentView, setTitle, unregisterImplementation, wrap, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionBarSherlockNative

public ActionBarSherlockNative(android.app.Activity activity,
                               int flags)
Method Detail

getActionBar

public ActionBar getActionBar()
Description copied from class: ActionBarSherlock
Get the current action bar instance.

Specified by:
getActionBar in class ActionBarSherlock
Returns:
Action bar instance.

dispatchInvalidateOptionsMenu

public void dispatchInvalidateOptionsMenu()
Description copied from class: ActionBarSherlock
Indicate that the menu should be recreated by calling ActionBarSherlock.OnCreateOptionsMenuListener.onCreateOptionsMenu(com.actionbarsherlock.view.Menu).

Specified by:
dispatchInvalidateOptionsMenu in class ActionBarSherlock

dispatchCreateOptionsMenu

public boolean dispatchCreateOptionsMenu(android.view.Menu menu)
Description copied from class: ActionBarSherlock
Notify the action bar that the Activity has triggered a menu creation which should happen on the conclusion of Activity.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.

Specified by:
dispatchCreateOptionsMenu in class ActionBarSherlock
Parameters:
menu - Activity native menu.
Returns:
true since we always want to say that we have a native

dispatchPrepareOptionsMenu

public boolean dispatchPrepareOptionsMenu(android.view.Menu menu)
Description copied from class: ActionBarSherlock
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. You should return the result of this method call and not call the superclass implementation.

Specified by:
dispatchPrepareOptionsMenu in class ActionBarSherlock
Parameters:
menu - Activity native menu.
Returns:
true if menu display should proceed.

dispatchOptionsItemSelected

public boolean dispatchOptionsItemSelected(android.view.MenuItem item)
Description copied from class: ActionBarSherlock
Notify the action bar that a native options menu item has been selected. The implementation should return the result of this method call.

Specified by:
dispatchOptionsItemSelected in class ActionBarSherlock
Parameters:
item - Options menu item.
Returns:
@{code true} if the selection was handled.

hasFeature

public boolean hasFeature(int feature)
Description copied from class: ActionBarSherlock
Query for the availability of a certain feature.

Specified by:
hasFeature in class ActionBarSherlock
Parameters:
feature - The feature ID to check.
Returns:
true if feature is enabled, false otherwise.

requestFeature

public boolean requestFeature(int featureId)
Description copied from class: ActionBarSherlock
Enable extended screen features. This must be called before setContentView(). 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.

Specified by:
requestFeature in class ActionBarSherlock
Parameters:
featureId - The desired features, defined as constants by Window.
Returns:
Returns true if the requested feature is supported and now enabled.

setUiOptions

public void setUiOptions(int uiOptions)
Description copied from class: ActionBarSherlock
Set extra options that will influence the UI for this window.

Specified by:
setUiOptions in class ActionBarSherlock
Parameters:
uiOptions - Flags specifying extra options for this window.

setUiOptions

public void setUiOptions(int uiOptions,
                         int mask)
Description copied from class: ActionBarSherlock
Set extra options that will influence the UI for this window. Only the bits filtered by mask will be modified.

Specified by:
setUiOptions in class ActionBarSherlock
Parameters:
uiOptions - Flags specifying extra options for this window.
mask - Flags specifying which options should be modified. Others will remain unchanged.

setContentView

public void setContentView(int layoutResId)
Description copied from class: ActionBarSherlock
Set the content of the activity inside the action bar.

Specified by:
setContentView in class ActionBarSherlock
Parameters:
layoutResId - Layout resource ID.

setContentView

public void setContentView(android.view.View view,
                           android.view.ViewGroup.LayoutParams params)
Description copied from class: ActionBarSherlock
Set the content of the activity inside the action bar.

Specified by:
setContentView in class ActionBarSherlock
Parameters:
view - The desired content to display.
params - Layout parameters to apply to the view.

addContentView

public void addContentView(android.view.View view,
                           android.view.ViewGroup.LayoutParams params)
Description copied from class: ActionBarSherlock
Variation on ActionBarSherlock.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.

Specified by:
addContentView in class ActionBarSherlock
Parameters:
view - The desired content to display.
params - Layout parameters for the view.

setTitle

public void setTitle(CharSequence title)
Description copied from class: ActionBarSherlock
Change the title associated with this activity.

Specified by:
setTitle in class ActionBarSherlock

setProgressBarVisibility

public void setProgressBarVisibility(boolean visible)
Description copied from class: ActionBarSherlock
Sets the visibility of the progress bar in the title.

In order for the progress bar to be shown, the feature must be requested via #requestWindowFeature(int).

Specified by:
setProgressBarVisibility in class ActionBarSherlock
Parameters:
visible - Whether to show the progress bars in the title.

setProgressBarIndeterminateVisibility

public void setProgressBarIndeterminateVisibility(boolean visible)
Description copied from class: ActionBarSherlock
Sets the visibility of the indeterminate progress bar in the title.

In order for the progress bar to be shown, the feature must be requested via #requestWindowFeature(int).

Specified by:
setProgressBarIndeterminateVisibility in class ActionBarSherlock
Parameters:
visible - Whether to show the progress bars in the title.

setProgressBarIndeterminate

public void setProgressBarIndeterminate(boolean indeterminate)
Description copied from class: ActionBarSherlock
Sets whether the horizontal progress bar in the title should be indeterminate (the circular is always indeterminate).

In order for the progress bar to be shown, the feature must be requested via #requestWindowFeature(int).

Specified by:
setProgressBarIndeterminate in class ActionBarSherlock
Parameters:
indeterminate - Whether the horizontal progress bar should be indeterminate.

setProgress

public void setProgress(int progress)
Description copied from class: ActionBarSherlock
Sets the progress for the progress bars in the title.

In order for the progress bar to be shown, the feature must be requested via #requestWindowFeature(int).

Specified by:
setProgress in class ActionBarSherlock
Parameters:
progress - 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.

setSecondaryProgress

public void setSecondaryProgress(int secondaryProgress)
Description copied from class: ActionBarSherlock
Sets the secondary progress for the progress bar in the title. This progress is drawn between the primary progress (set via ActionBarSherlock.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).

Specified by:
setSecondaryProgress in class ActionBarSherlock
Parameters:
secondaryProgress - The secondary progress for the progress bar. Valid ranges are from 0 to 10000 (both inclusive).

getThemedContext

protected android.content.Context getThemedContext()
Specified by:
getThemedContext in class ActionBarSherlock

startActionMode

public ActionMode startActionMode(ActionMode.Callback callback)
Description copied from class: ActionBarSherlock
Start an action mode.

Specified by:
startActionMode in class ActionBarSherlock
Parameters:
callback - Callback that will manage lifecycle events for this context mode.
Returns:
The ContextMode that was started, or null if it was canceled.
See Also:
ActionMode


Copyright © 2012-2013. All Rights Reserved.