Share via


CrossProfileApps.GetProfileSwitchingIconDrawable(UserHandle) Method

Definition

Return a drawable that calling app can show to user for the semantic of profile switching -- launching its own activity in specified user profile.

[Android.Runtime.Register("getProfileSwitchingIconDrawable", "(Landroid/os/UserHandle;)Landroid/graphics/drawable/Drawable;", "GetGetProfileSwitchingIconDrawable_Landroid_os_UserHandle_Handler", ApiSince=28)]
public virtual Android.Graphics.Drawables.Drawable GetProfileSwitchingIconDrawable (Android.OS.UserHandle userHandle);
[<Android.Runtime.Register("getProfileSwitchingIconDrawable", "(Landroid/os/UserHandle;)Landroid/graphics/drawable/Drawable;", "GetGetProfileSwitchingIconDrawable_Landroid_os_UserHandle_Handler", ApiSince=28)>]
abstract member GetProfileSwitchingIconDrawable : Android.OS.UserHandle -> Android.Graphics.Drawables.Drawable
override this.GetProfileSwitchingIconDrawable : Android.OS.UserHandle -> Android.Graphics.Drawables.Drawable

Parameters

userHandle
UserHandle

The UserHandle of the target profile, must be one of the users returned by #getTargetUserProfiles(), otherwise a SecurityException will be thrown.

Returns

an icon that calling app can show user for the semantic of launching its own activity in specified user profile.

Attributes

Remarks

Return a drawable that calling app can show to user for the semantic of profile switching -- launching its own activity in specified user profile. For example, it may return a briefcase icon if the given user handle is the managed profile one.

Java documentation for android.content.pm.CrossProfileApps.getProfileSwitchingIconDrawable(android.os.UserHandle).

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