WallpaperManager.Clear Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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
Exceptions
If an error occurs reverting to the built-in wallpaper.
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 android.Manifest.permission#SET_WALLPAPER
.
Java documentation 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
A bitwise combination of #FLAG_SYSTEM
or
#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. <ul> <li> When called with which=
#FLAG_LOCK
, clear the lockscreen wallpaper. The home screen wallpaper will become visible on the lock screen. </li>
<li> 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. </li>
<li> When called with which=
(#FLAG_LOCK
| #FLAG_SYSTEM
), put the default wallpaper on both home and lock screen, removing any user defined wallpaper.</li> </ul>
Java documentation for android.app.WallpaperManager.clear(int)
.
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.