Udostępnij za pośrednictwem


WallpaperManager.GetBuiltInDrawable Method

Definition

Overloads

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

The FLAG_* identifier of a valid wallpaper type. Throws IllegalArgumentException if an invalid wallpaper is requested.

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.

Java documentation for android.app.WallpaperManager.getBuiltInDrawable(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.

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

The height of the returned drawable

outHeight
Int32
scaleToFit
Boolean

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

horizontalAlignment
Single

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

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

Java documentation for android.app.WallpaperManager.getBuiltInDrawable(int, int, boolean, float, float).

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

The height of the returned drawable

outHeight
Int32
scaleToFit
Boolean

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

horizontalAlignment
Single

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

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

The FLAG_* identifier of a valid wallpaper type. Throws IllegalArgumentException if an invalid wallpaper is requested.

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.

Java documentation for android.app.WallpaperManager.getBuiltInDrawable(int, int, boolean, float, float, 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.

Applies to