PictureInPictureParams.Builder.SetCloseAction(RemoteAction) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定一個成交動作,應該在預設成交 PiP 動作之前執行。
[Android.Runtime.Register("setCloseAction", "(Landroid/app/RemoteAction;)Landroid/app/PictureInPictureParams$Builder;", "GetSetCloseAction_Landroid_app_RemoteAction_Handler", ApiSince=33)]
public virtual Android.App.PictureInPictureParams.Builder SetCloseAction(Android.App.RemoteAction? action);
[<Android.Runtime.Register("setCloseAction", "(Landroid/app/RemoteAction;)Landroid/app/PictureInPictureParams$Builder;", "GetSetCloseAction_Landroid_app_RemoteAction_Handler", ApiSince=33)>]
abstract member SetCloseAction : Android.App.RemoteAction -> Android.App.PictureInPictureParams.Builder
override this.SetCloseAction : Android.App.RemoteAction -> Android.App.PictureInPictureParams.Builder
參數
- action
- RemoteAction
RemoteAction:用來取代系統的關閉動作。 這個值可能是 Null。
傳回
這個建構者實例。 這個值不可能為零值。
- 屬性
備註
設定一個成交動作,應該在預設成交 PiP 動作之前執行。 自訂動作必須使用 Activity.finish() 快速關閉該活動。 否則,系統會強制關閉 PiP,彷彿沒有提供自訂的關閉操作。 如果動作與 PictureInPictureParams.Builder.setActions(List ) 中的某一集合相符,則可在選單中顯示該自訂動作。
另請參閱:
Android 參考資料。android.app.PictureInPictureParams.Builder.setCloseAction
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。