LauncherActivityInfo
open class LauncherActivityInfo
kotlin.Any | |
↳ | android.content.pm.LauncherActivityInfo |
A representation of an activity that can belong to this user or a managed profile associated with this user. It can be used to query the label, icon and badged icon for the activity.
Summary
Public methods | |
---|---|
open ActivityInfo |
Returns the ActivityInfo of the activity. |
open ApplicationInfo! |
Returns the application info for the application this activity belongs to. |
open Drawable! |
getBadgedIcon(density: Int) Returns the activity icon with badging appropriate for the profile. |
open ComponentName! |
Returns the component name of this activity. |
open Long |
Returns the time at which the package was first installed. |
open Drawable! |
Returns the icon for this activity, without any badging for the profile. |
open CharSequence! |
getLabel() Retrieves the label for the activity. |
open Float | |
open String! |
getName() Returns the name for the activity from android:name in the manifest. |
open UserHandle! |
getUser() Returns the user handle of the user profile that this activity belongs to. |
Public methods
getActivityInfo
open fun getActivityInfo(): ActivityInfo
Returns the ActivityInfo of the activity.
Return | |
---|---|
ActivityInfo |
Activity Info This value cannot be null . |
getApplicationInfo
open fun getApplicationInfo(): ApplicationInfo!
Returns the application info for the application this activity belongs to.
Return | |
---|---|
ApplicationInfo! |
getBadgedIcon
open fun getBadgedIcon(density: Int): Drawable!
Returns the activity icon with badging appropriate for the profile.
Parameters | |
---|---|
density |
Int: Optional density for the icon, or 0 to use the default density. Use DisplayMetrics for DPI values. |
Return | |
---|---|
Drawable! |
A badged icon for the activity. |
See Also
getComponentName
open fun getComponentName(): ComponentName!
Returns the component name of this activity.
Return | |
---|---|
ComponentName! |
ComponentName of the activity |
getFirstInstallTime
open fun getFirstInstallTime(): Long
Returns the time at which the package was first installed.
Return | |
---|---|
Long |
The time of installation of the package, in milliseconds. |
getIcon
open fun getIcon(density: Int): Drawable!
Returns the icon for this activity, without any badging for the profile.
Parameters | |
---|---|
density |
Int: The preferred density of the icon, zero for default density. Use density DPI values from DisplayMetrics . |
Return | |
---|---|
Drawable! |
The drawable associated with the activity. |
getLabel
open fun getLabel(): CharSequence!
Retrieves the label for the activity.
Return | |
---|---|
CharSequence! |
The label for the activity. |
getLoadingProgress
open fun getLoadingProgress(): Float
Return | |
---|---|
Float |
Package loading progress, range between [0, 1]. Value is between 0.0 and 1.0 inclusive |
getName
open fun getName(): String!
Returns the name for the activity from android:name in the manifest.
Return | |
---|---|
String! |
the name from android:name for the activity. |
getUser
open fun getUser(): UserHandle!
Returns the user handle of the user profile that this activity belongs to. In order to persist the identity of the profile, do not store the UserHandle. Instead retrieve its serial number from UserManager. You can convert the serial number back to a UserHandle for later use.
Return | |
---|---|
UserHandle! |
The UserHandle of the profile. |