Language

FillResponse.Builder.SetHeader(RemoteViews) Method

Definition

Sets a header to be shown as the first element in the list of datasets.

[Android.Runtime.Register("setHeader", "(Landroid/widget/RemoteViews;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=28)]
public Android.Service.Autofill.FillResponse.Builder SetHeader(Android.Widget.RemoteViews header);
[<Android.Runtime.Register("setHeader", "(Landroid/widget/RemoteViews;)Landroid/service/autofill/FillResponse$Builder;", "", ApiSince=28)>]
member this.SetHeader : Android.Widget.RemoteViews -> Android.Service.Autofill.FillResponse.Builder

Parameters

header
RemoteViews

a presentation to represent the header. This presentation is not clickable —calling RemoteViews.setOnClickPendingIntent(int,android.app.PendingIntent) on it would have no effect. This value cannot be null.

Returns

this builder. This value cannot be null.

Attributes

Remarks

Sets a header to be shown as the first element in the list of datasets.

When this method is called, you must also add a dataset, otherwise build() throws an IllegalStateException. Similarly, this method should only be used on FillResponses that do not require authentication (as the header could have been set directly in the main presentation in these cases).

Theme does not work with RemoteViews layout. Avoid hardcoded text color or background color: Autofill on different platforms may have different themes.

Android reference for android.service.autofill.FillResponse.Builder.setHeader.

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