public class ActionBarSherlockNative extends ActionBarSherlock
ActionBarSherlock.Implementation, ActionBarSherlock.OnActionModeFinishedListener, ActionBarSherlock.OnActionModeStartedListener, ActionBarSherlock.OnCreateOptionsMenuListener, ActionBarSherlock.OnCreatePanelMenuListener, ActionBarSherlock.OnMenuItemSelectedListener, ActionBarSherlock.OnOptionsItemSelectedListener, ActionBarSherlock.OnPrepareOptionsMenuListener, ActionBarSherlock.OnPreparePanelListener
DEBUG, FLAG_DELEGATE, mActivity, mIsDelegate, mMenuInflater, TAG
Constructor and Description |
---|
ActionBarSherlockNative(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. |
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.
|
callbackCreateOptionsMenu, callbackOptionsItemSelected, callbackPrepareOptionsMenu, dispatchCloseOptionsMenu, dispatchConfigurationChanged, dispatchDestroy, dispatchKeyEvent, dispatchMenuOpened, dispatchOpenOptionsMenu, dispatchPanelClosed, dispatchPause, dispatchPostCreate, dispatchPostResume, dispatchStop, dispatchTitleChanged, getMenuInflater, registerImplementation, setContentView, setTitle, unregisterImplementation, wrap, wrap
public ActionBarSherlockNative(android.app.Activity activity, int flags)
public ActionBar getActionBar()
ActionBarSherlock
getActionBar
in class ActionBarSherlock
public void dispatchInvalidateOptionsMenu()
ActionBarSherlock
ActionBarSherlock.OnCreateOptionsMenuListener.onCreateOptionsMenu(com.actionbarsherlock.view.Menu)
.dispatchInvalidateOptionsMenu
in class ActionBarSherlock
public boolean dispatchCreateOptionsMenu(android.view.Menu menu)
ActionBarSherlock
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.dispatchCreateOptionsMenu
in class ActionBarSherlock
menu
- Activity native menu.true
since we always want to say that we have a nativepublic boolean dispatchPrepareOptionsMenu(android.view.Menu menu)
ActionBarSherlock
dispatchPrepareOptionsMenu
in class ActionBarSherlock
menu
- Activity native menu.true
if menu display should proceed.public boolean dispatchOptionsItemSelected(android.view.MenuItem item)
ActionBarSherlock
dispatchOptionsItemSelected
in class ActionBarSherlock
item
- Options menu item.public boolean hasFeature(int feature)
ActionBarSherlock
hasFeature
in class ActionBarSherlock
feature
- The feature ID to check.true
if feature is enabled, false
otherwise.public boolean requestFeature(int featureId)
ActionBarSherlock
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.requestFeature
in class ActionBarSherlock
featureId
- The desired features, defined as constants by Window.public void setUiOptions(int uiOptions)
ActionBarSherlock
setUiOptions
in class ActionBarSherlock
uiOptions
- Flags specifying extra options for this window.public void setUiOptions(int uiOptions, int mask)
ActionBarSherlock
setUiOptions
in class ActionBarSherlock
uiOptions
- Flags specifying extra options for this window.mask
- Flags specifying which options should be modified. Others
will remain unchanged.public void setContentView(int layoutResId)
ActionBarSherlock
setContentView
in class ActionBarSherlock
layoutResId
- Layout resource ID.public void setContentView(android.view.View view, android.view.ViewGroup.LayoutParams params)
ActionBarSherlock
setContentView
in class ActionBarSherlock
view
- 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)
ActionBarSherlock
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.addContentView
in class ActionBarSherlock
view
- The desired content to display.params
- Layout parameters for the view.public void setTitle(CharSequence title)
ActionBarSherlock
setTitle
in class ActionBarSherlock
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 ActionBarSherlock
visible
- 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 ActionBarSherlock
visible
- 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 ActionBarSherlock
indeterminate
- 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 ActionBarSherlock
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.public void setSecondaryProgress(int secondaryProgress)
ActionBarSherlock
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)
.
setSecondaryProgress
in class ActionBarSherlock
secondaryProgress
- The secondary progress for the progress bar. Valid ranges are from
0 to 10000 (both inclusive).protected android.content.Context getThemedContext()
getThemedContext
in class ActionBarSherlock
public ActionMode startActionMode(ActionMode.Callback callback)
ActionBarSherlock
startActionMode
in class ActionBarSherlock
callback
- Callback that will manage lifecycle events for this
context mode.ActionMode
Copyright © 2011–2014. All rights reserved.