Język

WallpaperManager.Clear Method

Definition

Overloads

Name Description
Clear()

Remove any currently set system wallpaper, reverting to the system's built-in wallpaper.

Clear(WallpaperManagerFlags)

Remove one or more currently set wallpapers, reverting to the system default display for each one.

Clear()

Remove any currently set system wallpaper, reverting to the system's built-in wallpaper.

[Android.Runtime.Register("clear", "()V", "GetClearHandler")]
[Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")]
public virtual void Clear();
[<Android.Runtime.Register("clear", "()V", "GetClearHandler")>]
[<Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")>]
abstract member Clear : unit -> unit
override this.Clear : unit -> unit
Attributes

Remarks

Remove any currently set system wallpaper, reverting to the system's built-in wallpaper. On success, the intent Intent.ACTION_WALLPAPER_CHANGED is broadcast. This method requires the caller to hold the permission Manifest.permission.SET_WALLPAPER. Requires Manifest.permission.SET_WALLPAPER

Throws: IOException If an error occurs reverting to the built-in wallpaper.

Android reference for android.app.WallpaperManager.clear.

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

Clear(WallpaperManagerFlags)

Remove one or more currently set wallpapers, reverting to the system default display for each one.

[Android.Runtime.Register("clear", "(I)V", "GetClear_IHandler", ApiSince=24)]
[Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")]
public virtual void Clear(Android.App.WallpaperManagerFlags which);
[<Android.Runtime.Register("clear", "(I)V", "GetClear_IHandler", ApiSince=24)>]
[<Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")>]
abstract member Clear : Android.App.WallpaperManagerFlags -> unit
override this.Clear : Android.App.WallpaperManagerFlags -> unit

Parameters

which
WallpaperManagerFlags

int: A bitwise combination of FLAG_SYSTEM or FLAG_LOCK Value is either 0 or a combination of the following: FLAG_SYSTEM FLAG_LOCK

Attributes

Remarks

Remove one or more currently set wallpapers, reverting to the system default display for each one. On success, the intent Intent.ACTION_WALLPAPER_CHANGED is broadcast. When called with which=FLAG_LOCK, clear the lockscreen wallpaper. The home screen wallpaper will become visible on the lock screen. When called with which=FLAG_SYSTEM, revert the home screen wallpaper to default. The lockscreen wallpaper will be unchanged: if the previous wallpaper was shared between home and lock screen, it will become lock screen only. When called with which=(FLAG_LOCK | FLAG_SYSTEM), put the default wallpaper on both home and lock screen, removing any user defined wallpaper. . Requires Manifest.permission.SET_WALLPAPER

Throws: IOException If an error occurs reverting to the built-in wallpaper.

Android reference for android.app.WallpaperManager.clear.

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