java.lang.Object | ||
↳ | android.view.ActionProvider | |
↳ | android.app.MediaRouteActionProvider |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
If
overridesItemVisibility() returns true, the return value of this method
will help determine the visibility of the MenuItem this ActionProvider is bound to. | |||||||||||
This method was deprecated
in API level .
use
onCreateActionView(MenuItem)
| |||||||||||
Factory method called by the Android framework to create new action views.
| |||||||||||
Performs an optional default action.
| |||||||||||
The result of this method determines whether or not
isVisible() will be used
by the MenuItem this ActionProvider is bound to help determine its visibility. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.view.ActionProvider
| |||||||||||
From class
java.lang.Object
|
If overridesItemVisibility()
returns true, the return value of this method
will help determine the visibility of the MenuItem
this ActionProvider is bound to.
If the MenuItem's visibility is explicitly set to false by the application, the MenuItem will not be shown, even if this method returns true.
This method was deprecated
in API level .
use onCreateActionView(MenuItem)
Factory method called by the Android framework to create new action views.
This method has been deprecated in favor of onCreateActionView(MenuItem)
.
Newer apps that wish to support platform versions prior to API 16 should also
implement this method to return a valid action view.
Factory method called by the Android framework to create new action views. This method returns a new action view for the given MenuItem.
If your ActionProvider implementation overrides the deprecated no-argument overload
onCreateActionView()
, overriding this method for devices running API 16 or later
is recommended but optional. The default implementation calls onCreateActionView()
for compatibility with applications written for older platform versions.
item | MenuItem to create the action view for |
---|
Performs an optional default action.
For the case of an action provider placed in a menu item not shown as an action this method is invoked if previous callbacks for processing menu selection has handled the event.
A menu item selection is processed in the following order:
MenuItem.OnMenuItemClickListener.onMenuItemClick
.
Activity.onOptionsItemSelected(MenuItem)
Fragment.onOptionsItemSelected(MenuItem)
Intent
set via
MenuItem.setIntent(android.content.Intent)
The default implementation does not perform any action and returns false.
The result of this method determines whether or not isVisible()
will be used
by the MenuItem
this ActionProvider is bound to help determine its visibility.