WallpaperManager.GetBuiltInDrawable Method

Definition

Overloads

Name Description
GetBuiltInDrawable(WallpaperManagerFlags)

Obtain a drawable for the specified built-in static system wallpaper.

GetBuiltInDrawable(Int32, Int32, Boolean, Single, Single)

Returns a drawable for the system built-in static wallpaper.

GetBuiltInDrawable(Int32, Int32, Boolean, Single, Single, WallpaperManagerFlags)

Returns a drawable for the built-in static wallpaper of the specified type.

GetBuiltInDrawable(WallpaperManagerFlags)

Obtain a drawable for the specified built-in static system wallpaper.

[Android.Runtime.Register("getBuiltInDrawable", "(I)Landroid/graphics/drawable/Drawable;", "GetGetBuiltInDrawable_IHandler", ApiSince=24)]
public virtual Android.Graphics.Drawables.Drawable? GetBuiltInDrawable(Android.App.WallpaperManagerFlags which);
[<Android.Runtime.Register("getBuiltInDrawable", "(I)Landroid/graphics/drawable/Drawable;", "GetGetBuiltInDrawable_IHandler", ApiSince=24)>]
abstract member GetBuiltInDrawable : Android.App.WallpaperManagerFlags -> Android.Graphics.Drawables.Drawable
override this.GetBuiltInDrawable : Android.App.WallpaperManagerFlags -> Android.Graphics.Drawables.Drawable

Parameters

which
WallpaperManagerFlags

int: The FLAG_* identifier of a valid wallpaper type. Throws IllegalArgumentException if an invalid wallpaper is requested. Value is either 0 or a combination of the following: FLAG_SYSTEM FLAG_LOCK

Returns

A Drawable presenting the specified wallpaper image, or null if no built-in default image for that wallpaper type exists.

Attributes

Remarks

Obtain a drawable for the specified built-in static system wallpaper.

Throws: Parameters

Android reference for android.app.WallpaperManager.getBuiltInDrawable.

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

GetBuiltInDrawable(Int32, Int32, Boolean, Single, Single)

Returns a drawable for the system built-in static wallpaper.

[Android.Runtime.Register("getBuiltInDrawable", "(IIZFF)Landroid/graphics/drawable/Drawable;", "GetGetBuiltInDrawable_IIZFFHandler")]
public virtual Android.Graphics.Drawables.Drawable? GetBuiltInDrawable(int outWidth, int outHeight, bool scaleToFit, float horizontalAlignment, float verticalAlignment);
[<Android.Runtime.Register("getBuiltInDrawable", "(IIZFF)Landroid/graphics/drawable/Drawable;", "GetGetBuiltInDrawable_IIZFFHandler")>]
abstract member GetBuiltInDrawable : int * int * bool * single * single -> Android.Graphics.Drawables.Drawable
override this.GetBuiltInDrawable : int * int * bool * single * single -> Android.Graphics.Drawables.Drawable

Parameters

outWidth
Int32

int: The width of the returned drawable

outHeight
Int32

int

scaleToFit
Boolean

boolean: If true, scale the wallpaper down rather than just cropping it

horizontalAlignment
Single

float: A float value between 0 and 1 specifying where to crop the image; 0 for left-aligned, 0.5 for horizontal center-aligned, and 1 for right-aligned

verticalAlignment
Single

float: A float value between 0 and 1 specifying where to crop the image; 0 for top-aligned, 0.5 for vertical center-aligned, and 1 for bottom-aligned

Returns

A Drawable presenting the built-in default system wallpaper image, or null if no such default image is defined on this device.

Attributes

Remarks

Returns a drawable for the system built-in static wallpaper. Based on the parameters, the drawable can be cropped and scaled

Android reference for android.app.WallpaperManager.getBuiltInDrawable.

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

GetBuiltInDrawable(Int32, Int32, Boolean, Single, Single, WallpaperManagerFlags)

Returns a drawable for the built-in static wallpaper of the specified type.

[Android.Runtime.Register("getBuiltInDrawable", "(IIZFFI)Landroid/graphics/drawable/Drawable;", "GetGetBuiltInDrawable_IIZFFIHandler", ApiSince=24)]
public virtual Android.Graphics.Drawables.Drawable? GetBuiltInDrawable(int outWidth, int outHeight, bool scaleToFit, float horizontalAlignment, float verticalAlignment, Android.App.WallpaperManagerFlags which);
[<Android.Runtime.Register("getBuiltInDrawable", "(IIZFFI)Landroid/graphics/drawable/Drawable;", "GetGetBuiltInDrawable_IIZFFIHandler", ApiSince=24)>]
abstract member GetBuiltInDrawable : int * int * bool * single * single * Android.App.WallpaperManagerFlags -> Android.Graphics.Drawables.Drawable
override this.GetBuiltInDrawable : int * int * bool * single * single * Android.App.WallpaperManagerFlags -> Android.Graphics.Drawables.Drawable

Parameters

outWidth
Int32

int: The width of the returned drawable

outHeight
Int32

int

scaleToFit
Boolean

boolean: If true, scale the wallpaper down rather than just cropping it

horizontalAlignment
Single

float: A float value between 0 and 1 specifying where to crop the image; 0 for left-aligned, 0.5 for horizontal center-aligned, and 1 for right-aligned

verticalAlignment
Single

float: A float value between 0 and 1 specifying where to crop the image; 0 for top-aligned, 0.5 for vertical center-aligned, and 1 for bottom-aligned

which
WallpaperManagerFlags

int: The FLAG_* identifier of a valid wallpaper type. Throws IllegalArgumentException if an invalid wallpaper is requested. Value is either 0 or a combination of the following: FLAG_SYSTEM FLAG_LOCK

Returns

A Drawable presenting the built-in default wallpaper image of the given type, or null if no default image of that type is defined on this device.

Attributes

Remarks

Returns a drawable for the built-in static wallpaper of the specified type. Based on the parameters, the drawable can be cropped and scaled.

Throws: Parameters

Throws: outWidth int: The width of the returned drawable

Throws: outHeight int

Throws: scaleToFit boolean: If true, scale the wallpaper down rather than just cropping it

Throws: horizontalAlignment float: A float value between 0 and 1 specifying where to crop the image; 0 for left-aligned, 0.5 for horizontal center-aligned, and 1 for right-aligned

Throws: verticalAlignment float: A float value between 0 and 1 specifying where to crop the image; 0 for top-aligned, 0.5 for vertical center-aligned, and 1 for bottom-aligned

Android reference for android.app.WallpaperManager.getBuiltInDrawable.

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