WallpaperManager.GetBuiltInDrawable 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
| 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
The wallpaper type: either System or Lock. Throws IllegalArgumentException if the value is invalid.
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.
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
The wallpaper type: either System or Lock. Throws IllegalArgumentException if the value is invalid.
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.
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.