Language

SaveInfo.Builder.SetNegativeAction(NegativeButtonStyle, IntentSender) Method

Definition

Sets the style and listener for the negative save action.

[Android.Runtime.Register("setNegativeAction", "(ILandroid/content/IntentSender;)Landroid/service/autofill/SaveInfo$Builder;", "", ApiSince=26)]
public Android.Service.Autofill.SaveInfo.Builder SetNegativeAction(Android.Service.Autofill.NegativeButtonStyle style, Android.Content.IntentSender? listener);
[<Android.Runtime.Register("setNegativeAction", "(ILandroid/content/IntentSender;)Landroid/service/autofill/SaveInfo$Builder;", "", ApiSince=26)>]
member this.SetNegativeAction : Android.Service.Autofill.NegativeButtonStyle * Android.Content.IntentSender -> Android.Service.Autofill.SaveInfo.Builder

Parameters

style
NegativeButtonStyle

The action style. Value is one of the following: SaveInfo.NEGATIVE_BUTTON_STYLE_CANCEL; SaveInfo.NEGATIVE_BUTTON_STYLE_REJECT; SaveInfo.NEGATIVE_BUTTON_STYLE_NEVER

listener
IntentSender

The action listener. This value may be null.

Returns

This builder. This value cannot be null.

Attributes

Remarks

Sets the style and listener for the negative save action.

This allows an autofill service to customize the style and be notified when the user selects the negative action in the save UI. Note that selecting the negative action regardless of its style and listener being customized would dismiss the save UI and if a custom listener intent is provided then this intent is started. The default style is SaveInfo.NEGATIVE_BUTTON_STYLE_CANCEL

Android reference for android.service.autofill.SaveInfo.Builder.setNegativeAction.

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