Share via


ActionBar.SetCustomView Method

Definition

Overloads

SetCustomView(View, ActionBar+LayoutParams)

Set the action bar into custom navigation mode, supplying a view for custom navigation.

SetCustomView(Int32)

Set the action bar into custom navigation mode, supplying a view for custom navigation.

SetCustomView(View, ActionBar+LayoutParams)

Set the action bar into custom navigation mode, supplying a view for custom navigation.

[Android.Runtime.Register("setCustomView", "(Landroid/view/View;Landroid/app/ActionBar$LayoutParams;)V", "GetSetCustomView_Landroid_view_View_Landroid_app_ActionBar_LayoutParams_Handler")]
public abstract void SetCustomView (Android.Views.View? view, Android.App.ActionBar.LayoutParams? layoutParams);
[<Android.Runtime.Register("setCustomView", "(Landroid/view/View;Landroid/app/ActionBar$LayoutParams;)V", "GetSetCustomView_Landroid_view_View_Landroid_app_ActionBar_LayoutParams_Handler")>]
abstract member SetCustomView : Android.Views.View * Android.App.ActionBar.LayoutParams -> unit

Parameters

view
View

Custom navigation view to place in the ActionBar.

layoutParams
ActionBar.LayoutParams

How this custom view should layout in the bar.

Attributes

Remarks

Java documentation for android.app.ActionBar.setCustomView(int).

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.

See also

  • <xref:Android.App.ActionBar.SetDisplayOptions(Android.App.ActionBarDisplayOptions%2c+Android.App.ActionBarDisplayOptions)>

Applies to

SetCustomView(Int32)

Set the action bar into custom navigation mode, supplying a view for custom navigation.

[Android.Runtime.Register("setCustomView", "(I)V", "GetSetCustomView_IHandler")]
public abstract void SetCustomView (int resId);
[<Android.Runtime.Register("setCustomView", "(I)V", "GetSetCustomView_IHandler")>]
abstract member SetCustomView : int -> unit

Parameters

resId
Int32

Resource ID of a layout to inflate into the ActionBar.

Attributes

Remarks

Set the action bar into custom navigation mode, supplying a view for custom navigation.

Custom navigation views appear between the application icon and any action buttons and may use any space available there. Common use cases for custom navigation views might include an auto-suggesting address bar for a browser or other navigation mechanisms that do not translate well to provided navigation modes.

The display option #DISPLAY_SHOW_CUSTOM must be set for the custom view to be displayed.

Java documentation for android.app.ActionBar.setCustomView(int).

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.

See also

  • <xref:Android.App.ActionBar.SetDisplayOptions(Android.App.ActionBarDisplayOptions%2c+Android.App.ActionBarDisplayOptions)>

Applies to