WallpaperManager.SendWallpaperCommand 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
對目前正在播放的桌布發送任意指令。
[Android.Runtime.Register("sendWallpaperCommand", "(Landroid/os/IBinder;Ljava/lang/String;IIILandroid/os/Bundle;)V", "GetSendWallpaperCommand_Landroid_os_IBinder_Ljava_lang_String_IIILandroid_os_Bundle_Handler")]
[Android.Runtime.RequiresPermission("android.permission.ALWAYS_UPDATE_WALLPAPER")]
public virtual void SendWallpaperCommand(Android.OS.IBinder? windowToken, string? action, int x, int y, int z, Android.OS.Bundle? extras);
[<Android.Runtime.Register("sendWallpaperCommand", "(Landroid/os/IBinder;Ljava/lang/String;IIILandroid/os/Bundle;)V", "GetSendWallpaperCommand_Landroid_os_IBinder_Ljava_lang_String_IIILandroid_os_Bundle_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.ALWAYS_UPDATE_WALLPAPER")>]
abstract member SendWallpaperCommand : Android.OS.IBinder * string * int * int * int * Android.OS.Bundle -> unit
override this.SendWallpaperCommand : Android.OS.IBinder * string * int * int * int * Android.OS.Bundle -> unit
參數
- windowToken
- IBinder
IBinder:這些偏移應該關聯的視窗,由 View.getWindowToken() 回傳。
- action
- String
字串:要執行的指令名稱。 必須是有範圍的名稱以避免碰撞,例如「com.mycompany.wallpaper.DOIT」。
- x
- Int32
int:基於指令的任意整數參數。
- y
- Int32
int:基於指令的任意整數參數。
- z
- Int32
int:基於指令的任意整數參數。
- extras
- Bundle
Bundle:指令的可選額外資訊,或為 null。
- 屬性
備註
對目前正在播放的桌布發送任意指令。
Android 參考資料。android.app.WallpaperManager.sendWallpaperCommand
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。