WallpaperService.Engine.OnCommand 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
處理一個傳送到桌布的指令。WallpaperManager#sendWallpaperCommand
[Android.Runtime.Register("onCommand", "(Ljava/lang/String;IIILandroid/os/Bundle;Z)Landroid/os/Bundle;", "GetOnCommand_Ljava_lang_String_IIILandroid_os_Bundle_ZHandler")]
public virtual Android.OS.Bundle? OnCommand(string? action, int x, int y, int z, Android.OS.Bundle? extras, bool resultRequested);
[<Android.Runtime.Register("onCommand", "(Ljava/lang/String;IIILandroid/os/Bundle;Z)Landroid/os/Bundle;", "GetOnCommand_Ljava_lang_String_IIILandroid_os_Bundle_ZHandler")>]
abstract member OnCommand : string * int * int * int * Android.OS.Bundle * bool -> Android.OS.Bundle
override this.OnCommand : string * int * int * int * Android.OS.Bundle * bool -> Android.OS.Bundle
參數
- action
- String
要執行的指令名稱。 這會告訴你該怎麼做,以及如何解讀其他論點。
- x
- Int32
通用整數參數。
- y
- Int32
通用整數參數。
- z
- Int32
通用整數參數。
- extras
- Bundle
有沒有其他參數?
- resultRequested
- Boolean
若為真,呼叫者請求回傳一個與該指令相符的結果。
傳回
如果要回傳結果,請建立一個 Bundle,並將結果資料放入其中。 否則回傳 null。
- 屬性
備註
處理一個傳送到桌布的指令。WallpaperManager#sendWallpaperCommand 預設實作不做任何事,且總是回傳 null 作為結果。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。