Android.App.Activity.SetActionBar Method
Set a Android.Widget.Toolbar to act as the Android.App.ActionBar for this Activity window.

Syntax

[Android.Runtime.Register("setActionBar", "(Landroid/widget/Toolbar;)V", "GetSetActionBar_Landroid_widget_Toolbar_Handler")]
public virtual void SetActionBar (Android.Widget.Toolbar toolbar)

Parameters

toolbar
Toolbar to set as the Activity's action bar

Remarks

Set a Android.Widget.Toolbar to act as the Android.App.ActionBar for this Activity window.

When set to a non-null value the Activity.ActionBar method will return an Android.App.ActionBar object that can be used to control the given toolbar as if it were a traditional window decor action bar. The toolbar's menu will be populated with the Activity's options menu and the navigation button will be wired through the standard NoType:android/R$id;Href=../../../reference/android/R.id.html#home menu select action.

In order to use a Toolbar within the Activity's window content the application must not request the window feature Android.Views.Window.FEATURE_ACTION_BAR.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1