Language

AlertDialog.Builder.SetCustomTitle(View) Method

Definition

Set the title using the custom view customTitleView.

[Android.Runtime.Register("setCustomTitle", "(Landroid/view/View;)Landroid/app/AlertDialog$Builder;", "GetSetCustomTitle_Landroid_view_View_Handler")]
public virtual Android.App.AlertDialog.Builder SetCustomTitle(Android.Views.View customTitleView);
[<Android.Runtime.Register("setCustomTitle", "(Landroid/view/View;)Landroid/app/AlertDialog$Builder;", "GetSetCustomTitle_Landroid_view_View_Handler")>]
abstract member SetCustomTitle : Android.Views.View -> Android.App.AlertDialog.Builder
override this.SetCustomTitle : Android.Views.View -> Android.App.AlertDialog.Builder

Parameters

customTitleView
View

View: the custom view to use as the title

Returns

this Builder object to allow for chaining of calls to set methods

Attributes

Remarks

Set the title using the custom view customTitleView. The methods setTitle(int) and setIcon(int) should be sufficient for most titles, but this is provided if the title needs more customization. Using this will replace the title and icon set via the other methods. Note: To ensure consistent styling, the custom view should be inflated or constructed using the alert dialog's themed context obtained via getContext().

Android reference for android.app.AlertDialog.Builder.setCustomTitle.

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.

Applies to