Android.Test.Mock.MockPackageManager.GetUserBadgedDrawableForDensity Method
If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a badged copy of the given drawable allowing the user to distinguish it from the original drawable.

Syntax

[Android.Runtime.Register("getUserBadgedDrawableForDensity", "(Landroid/graphics/drawable/Drawable;Landroid/os/UserHandle;Landroid/graphics/Rect;I)Landroid/graphics/drawable/Drawable;", "GetGetUserBadgedDrawableForDensity_Landroid_graphics_drawable_Drawable_Landroid_os_UserHandle_Landroid_graphics_Rect_IHandler")]
public override Android.Graphics.Drawables.Drawable GetUserBadgedDrawableForDensity (Android.Graphics.Drawables.Drawable drawable, Android.OS.UserHandle user, Android.Graphics.Rect badgeLocation, int badgeDensity)

Parameters

drawable
The drawable to badge.
user
The target user.
badgeLocation
Where in the bounds of the badged drawable to place the badge. If not provided, the badge is applied on top of the entire drawable being badged.
badgeDensity
The optional desired density for the badge as per Android.Util.DisplayMetrics.DensityDpi. If not provided, the density of the display is used.

Returns

Documentation for this section has not yet been entered.

Remarks

If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a badged copy of the given drawable allowing the user to distinguish it from the original drawable. The caller can specify the location in the bounds of the drawable to be badged where the badge should be applied as well as the density of the badge to be used.

If the original drawable is a BitmapDrawable and the backing bitmap is mutable as per Android.Graphics.Bitmap.IsMutable, the bading is performed in place and the original drawable is returned.

[Android Documentation]

Requirements

Namespace: Android.Test.Mock
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1