DevicePolicyResourcesManager.GetDrawableForDensity 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
GetDrawableForDensity(String, String, Int32, ISupplier) |
Similar to |
GetDrawableForDensity(String, String, String, Int32, ISupplier) |
Similar to |
GetDrawableForDensity(String, String, Int32, ISupplier)
Similar to #getDrawable(String, String, Supplier)
, but also accepts
density
.
[Android.Runtime.Register("getDrawableForDensity", "(Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Supplier;)Landroid/graphics/drawable/Drawable;", "GetGetDrawableForDensity_Ljava_lang_String_Ljava_lang_String_ILjava_util_function_Supplier_Handler", ApiSince=33)]
public virtual Android.Graphics.Drawables.Drawable? GetDrawableForDensity (string drawableId, string drawableStyle, int density, Java.Util.Functions.ISupplier defaultDrawableLoader);
[<Android.Runtime.Register("getDrawableForDensity", "(Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Supplier;)Landroid/graphics/drawable/Drawable;", "GetGetDrawableForDensity_Ljava_lang_String_Ljava_lang_String_ILjava_util_function_Supplier_Handler", ApiSince=33)>]
abstract member GetDrawableForDensity : string * string * int * Java.Util.Functions.ISupplier -> Android.Graphics.Drawables.Drawable
override this.GetDrawableForDensity : string * string * int * Java.Util.Functions.ISupplier -> Android.Graphics.Drawables.Drawable
Parameters
- drawableId
- String
The drawable ID to get the updated resource for.
- drawableStyle
- String
The drawable style to use.
- density
- Int32
The desired screen density indicated by the resource as
found in DisplayMetrics
. A value of 0 means to use the
density returned from Resources#getConfiguration()
.
- defaultDrawableLoader
- ISupplier
To get the default drawable if no updated drawable was set for the provided params.
Returns
- Attributes
Remarks
Similar to #getDrawable(String, String, Supplier)
, but also accepts density
. See Resources#getDrawableForDensity(int, int, Resources.Theme)
.
Calls to this API will not return null
unless no updated drawable was found and the call to defaultDrawableLoader
returned null
.
Callers should register for DevicePolicyManager#ACTION_DEVICE_POLICY_RESOURCE_UPDATED
to get notified when a resource has been updated.
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
GetDrawableForDensity(String, String, String, Int32, ISupplier)
Similar to #getDrawable(String, String, String, Supplier)
, but also accepts
density
.
[Android.Runtime.Register("getDrawableForDensity", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Supplier;)Landroid/graphics/drawable/Drawable;", "GetGetDrawableForDensity_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_ILjava_util_function_Supplier_Handler", ApiSince=33)]
public virtual Android.Graphics.Drawables.Drawable? GetDrawableForDensity (string drawableId, string drawableStyle, string drawableSource, int density, Java.Util.Functions.ISupplier defaultDrawableLoader);
[<Android.Runtime.Register("getDrawableForDensity", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/util/function/Supplier;)Landroid/graphics/drawable/Drawable;", "GetGetDrawableForDensity_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_ILjava_util_function_Supplier_Handler", ApiSince=33)>]
abstract member GetDrawableForDensity : string * string * string * int * Java.Util.Functions.ISupplier -> Android.Graphics.Drawables.Drawable
override this.GetDrawableForDensity : string * string * string * int * Java.Util.Functions.ISupplier -> Android.Graphics.Drawables.Drawable
Parameters
- drawableId
- String
The drawable ID to get the updated resource for.
- drawableStyle
- String
The drawable style to use.
- drawableSource
- String
The source for the caller.
- density
- Int32
The desired screen density indicated by the resource as
found in DisplayMetrics
. A value of 0 means to use the
density returned from Resources#getConfiguration()
.
- defaultDrawableLoader
- ISupplier
To get the default drawable if no updated drawable was set for the provided params.
Returns
- Attributes
Remarks
Similar to #getDrawable(String, String, String, Supplier)
, but also accepts density
. See Resources#getDrawableForDensity(int, int, Resources.Theme)
.
Calls to this API will not return null
unless no updated drawable was found and the call to defaultDrawableLoader
returned null
.
Callers should register for DevicePolicyManager#ACTION_DEVICE_POLICY_RESOURCE_UPDATED
to get notified when a resource has been updated.
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.