ActionProvider.OnPerformDefaultAction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs an optional default action.
[Android.Runtime.Register("onPerformDefaultAction", "()Z", "GetOnPerformDefaultActionHandler")]
public virtual bool OnPerformDefaultAction ();
[<Android.Runtime.Register("onPerformDefaultAction", "()Z", "GetOnPerformDefaultActionHandler")>]
abstract member OnPerformDefaultAction : unit -> bool
override this.OnPerformDefaultAction : unit -> bool
Returns
- Attributes
Remarks
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: <ul> <li> Receiving a call to MenuItem.OnMenuItemClickListener#onMenuItemClick MenuItem.OnMenuItemClickListener.onMenuItemClick
. </li> <li> Receiving a call to android.app.Activity#onOptionsItemSelected(MenuItem) Activity.onOptionsItemSelected(MenuItem)
</li> <li> Receiving a call to android.app.Fragment#onOptionsItemSelected(MenuItem) Fragment.onOptionsItemSelected(MenuItem)
</li> <li> Launching the android.content.Intent
set via MenuItem#setIntent(android.content.Intent) MenuItem.setIntent(android.content.Intent)
</li> <li> Invoking this method. </li> </ul>
The default implementation does not perform any action and returns false.
Java documentation for android.view.ActionProvider.onPerformDefaultAction()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.