語言

SaveInfo.Builder.SetNegativeAction(NegativeButtonStyle, IntentSender) 方法

定義

設定負向豁免動作的風格和監聽者。

[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

參數

style
NegativeButtonStyle

動作風格。 價值屬於以下之一:SaveInfo.NEGATIVE_BUTTON_STYLE_CANCEL;SaveInfo.NEGATIVE_BUTTON_STYLE_REJECT;SaveInfo.NEGATIVE_BUTTON_STYLE_NEVER

listener
IntentSender

行動聆聽者。 這個值可能是 Null。

傳回

這個建築商。 這個值不可能為零值。

屬性

備註

設定負向豁免動作的風格和監聽者。

這讓自動填充服務能自訂樣式,並在使用者選擇存檔 UI 中的負面動作時收到通知。 請注意,無論選擇負向動作的樣式與可自訂的監聽者,都會忽略儲存 UI ;若提供自訂監聽者意圖,則該意圖會被啟動。 預設風格是SaveInfo.NEGATIVE_BUTTON_STYLE_CANCEL

Android 參考資料。android.service.autofill.SaveInfo.Builder.setNegativeAction

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於