WallpaperManager.PeekDrawable 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
PeekDrawable() |
<strong> Important note: </strong>
<ul>
<li>Up to version S, this method requires the
|
PeekDrawable(WallpaperManagerFlags) |
<strong> Important note: </strong>
<ul>
<li>Up to version S, this method requires the
|
PeekDrawable()
<strong> Important note: </strong>
<ul>
<li>Up to version S, this method requires the
android.Manifest.permission#READ_EXTERNAL_STORAGE
permission.
[Android.Runtime.Register("peekDrawable", "()Landroid/graphics/drawable/Drawable;", "GetPeekDrawableHandler")]
public virtual Android.Graphics.Drawables.Drawable? PeekDrawable ();
[<Android.Runtime.Register("peekDrawable", "()Landroid/graphics/drawable/Drawable;", "GetPeekDrawableHandler")>]
abstract member PeekDrawable : unit -> Android.Graphics.Drawables.Drawable
override this.PeekDrawable : unit -> Android.Graphics.Drawables.Drawable
Returns
A Drawable object for the requested wallpaper.
- Attributes
Remarks
<strong> Important note: </strong> <ul> <li>Up to version S, this method requires the android.Manifest.permission#READ_EXTERNAL_STORAGE
permission.</li> <li>Starting in T, directly accessing the wallpaper is not possible anymore, instead the default system wallpaper is returned (some versions of T may throw a SecurityException
).</li> <li>From version U, this method should not be used and will always throw a
Java documentation for android.app.WallpaperManager.peekDrawable()
.
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
PeekDrawable(WallpaperManagerFlags)
<strong> Important note: </strong>
<ul>
<li>Up to version S, this method requires the
android.Manifest.permission#READ_EXTERNAL_STORAGE
permission.
[Android.Runtime.Register("peekDrawable", "(I)Landroid/graphics/drawable/Drawable;", "GetPeekDrawable_IHandler", ApiSince=34)]
public virtual Android.Graphics.Drawables.Drawable? PeekDrawable (Android.App.WallpaperManagerFlags which);
[<Android.Runtime.Register("peekDrawable", "(I)Landroid/graphics/drawable/Drawable;", "GetPeekDrawable_IHandler", ApiSince=34)>]
abstract member PeekDrawable : Android.App.WallpaperManagerFlags -> Android.Graphics.Drawables.Drawable
override this.PeekDrawable : Android.App.WallpaperManagerFlags -> Android.Graphics.Drawables.Drawable
Parameters
- which
- WallpaperManagerFlags
The FLAG_*
identifier of a valid wallpaper type. Throws
IllegalArgumentException if an invalid wallpaper is requested.
Returns
A Drawable object for the requested wallpaper.
- Attributes
Remarks
<strong> Important note: </strong> <ul> <li>Up to version S, this method requires the android.Manifest.permission#READ_EXTERNAL_STORAGE
permission.</li> <li>Starting in T, directly accessing the wallpaper is not possible anymore, instead the default system wallpaper is returned (some versions of T may throw a SecurityException
).</li> <li>From version U, this method should not be used and will always throw a
Java documentation for android.app.WallpaperManager.peekDrawable(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.