Reference:Android.content.pm.ActivityInfo
From Triled Wiki
android.content.pm
public class android.content.pm.ActivityInfo
| java.lang.Object | ||||
| android.content.pm.PackageItemInfo | ||||
| android.content.pm.ComponentInfo | ||||
| android.content.pm.ActivityInfo | Parcelable | |||
Information you can retrieve about a particular application activity or receiver. This corresponds to information collected from the AndroidManifest.xml's <activity> and <receiver> tags.
[edit] Summary
[edit] Constants
| Value | ||||
|---|---|---|---|---|
| int | CLEAR_ON_BACKGROUND_FLAG | Bit in flags that indicates that the activity's stack should be cleared when it moves to the background. | 2 | 0x00000002 |
| int | CONFIG_FONT_SCALE | Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor. | 1 | 0x00000001 |
| int | CONFIG_KEYBOARD | Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type. | 8 | 0x00000008 |
| int | CONFIG_KEYBOARD_HIDDEN | Bit in configChanges that indicates that the activity can itself handle changes to the keyboard being hidden/exposed. | 16 | 0x00000010 |
| int | CONFIG_LOCALE | Bit in configChanges that indicates that the activity can itself handle changes to the locale. | 2 | 0x00000002 |
| int | CONFIG_NAVIGATION | Bit in configChanges that indicates that the activity can itself handle changes to the navigation type. | 32 | 0x00000020 |
| int | CONFIG_ORIENTATION | Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation. | 64 | 0x00000040 |
| int | CONFIG_TOUCHSCREEN | Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type. | 4 | 0x00000004 |
| Creator | CREATOR | |||
| int | EXCLUDE_FROM_RECENTS_FLAG | Bit in flags that indicates that the activity should not appear in the list of recently launched activities. | 8 | 0x00000008 |
| int | MULTIPLE_LAUNCH | Constant corresponding to multiple in the launchMode attribute. | 0 | 0x00000000 |
| int | MULTIPROCESS_FLAG | Bit in flags indicating whether this activity is able to run in multiple processes. | 1 | 0x00000001 |
| int | SINGLE_INSTANCE_LAUNCH | Constant corresponding to singleInstance in the launchMode attribute. | 3 | 0x00000003 |
| int | SINGLE_TASK_LAUNCH | Constant corresponding to singleTask in the launchMode attribute. | 2 | 0x00000002 |
| int | SINGLE_TOP_LAUNCH | Constant corresponding to singleTop in the launchMode attribute. | 1 | 0x00000001 |
| int | STATE_NOT_NEEDED_FLAG | Bit in flags that indicates that the activity's state is not required to be saved, so that if there is a failure the activity will not be removed from the activity stack. | 4 | 0x00000004 |
[edit] Fields
| public | int | configChanges | Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system). | ||
| public | int | flags | Options that have been set in the activity declaration in the manifest: MULTIPROCESS_FLAG, CLEAR_ON_BACKGROUND_FLAG, STATE_NOT_NEEDED_FLAG. | ||
| public | int | launchMode | The launch mode style requested by the activity. | ||
| public | String | permission | Optional name of a permission required to be able to access this Activity. | ||
| public | String | taskAffinity | The affinity this activity has for another task in the system. | ||
| public | int | theme | A style resource identifier (in the package's resources) of this activity's theme. |
[edit] Fields inherited from class android.content.pm.ComponentInfo
applicationInfo, enabled, processName[edit] Fields inherited from class android.content.pm.PackageItemInfo
icon, labelRes, metaData, name, nonLocalizedLabel, packageName
[edit] Public Constructors
| ActivityInfo () | |||||
| ActivityInfo (ActivityInfo orig) |
[edit] Public Methods
| void | dump (Printer pw, String prefix) | ||||
| final | int | getThemeResource () | |||
| Return the theme resource identifier to use for this activity. | |||||
| String | toString () | ||||
| Answers a string containing a concise, human-readable description of the receiver. | |||||
| void | writeToParcel (Parcel dest) | ||||
[edit] Methods inherited from class android.content.pm.ComponentInfo
dumpBack, dumpFront, getIconResource, loadIcon, loadLabel, writeToParcel[edit] Methods inherited from class android.content.pm.PackageItemInfo
dumpFront, loadIcon, loadLabel, loadXmlMetaData, writeToParcel[edit] Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait[edit] Methods inherited from interface android.os.Parcelable
[edit] Details
[edit] Constants
[edit] public static final int CLEAR_ON_BACKGROUND_FLAG
Bit in flags that indicates that the activity's stack should be cleared when it moves to the background. When the user next brings the task to the front, they will return to the original activity at the top of the tasks. This flag only applies to activities that are used to start the root of a new task. Set from the clearOnBackground attribute. Constant Value: 2 (0x00000002)
[edit] public static final int CONFIG_FONT_SCALE
Bit in configChanges that indicates that the activity can itself handle changes to the font scaling factor. Set from the configChanges attribute. Constant Value: 1 (0x00000001)
[edit] public static final int CONFIG_KEYBOARD
Bit in configChanges that indicates that the activity can itself handle changes to the keyboard type. Set from the configChanges attribute. Constant Value: 8 (0x00000008)
[edit] public static final int CONFIG_KEYBOARD_HIDDEN
Bit in configChanges that indicates that the activity can itself handle changes to the keyboard being hidden/exposed. Set from the configChanges attribute. Constant Value: 16 (0x00000010)
[edit] public static final int CONFIG_LOCALE
Bit in configChanges that indicates that the activity can itself handle changes to the locale. Set from the configChanges attribute. Constant Value: 2 (0x00000002)
[edit] public static final int CONFIG_NAVIGATION
Bit in configChanges that indicates that the activity can itself handle changes to the navigation type. Set from the configChanges attribute. Constant Value: 32 (0x00000020)
[edit] public static final int CONFIG_ORIENTATION
Bit in configChanges that indicates that the activity can itself handle changes to the screen orientation. Set from the configChanges attribute. Constant Value: 64 (0x00000040)
[edit] public static final int CONFIG_TOUCHSCREEN
Bit in configChanges that indicates that the activity can itself handle changes to the touchscreen type. Set from the configChanges attribute. Constant Value: 4 (0x00000004)
[edit] public static final Creator CREATOR
[edit] public static final int EXCLUDE_FROM_RECENTS_FLAG
Bit in flags that indicates that the activity should not appear in the list of recently launched activities. Set from the excludeFromRecents attribute. Constant Value: 8 (0x00000008)
[edit] public static final int MULTIPLE_LAUNCH
Constant corresponding to multiple in the launchMode attribute. Constant Value: 0 (0x00000000)
[edit] public static final int MULTIPROCESS_FLAG
Bit in flags indicating whether this activity is able to run in multiple processes. If true, the system may instantiate it in the some process as the process starting it in order to conserve resources. If false, the default, it always runs in processName. Set from the multiprocess attribute. Constant Value: 1 (0x00000001)
[edit] public static final int SINGLE_INSTANCE_LAUNCH
Constant corresponding to singleInstance in the launchMode attribute. Constant Value: 3 (0x00000003)
[edit] public static final int SINGLE_TASK_LAUNCH
Constant corresponding to singleTask in the launchMode attribute. Constant Value: 2 (0x00000002)
[edit] public static final int SINGLE_TOP_LAUNCH
Constant corresponding to singleTop in the launchMode attribute. Constant Value: 1 (0x00000001)
[edit] public static final int STATE_NOT_NEEDED_FLAG
Bit in flags that indicates that the activity's state is not required to be saved, so that if there is a failure the activity will not be removed from the activity stack. Set from the stateNotNeeded attribute. Constant Value: 4 (0x00000004)
[edit] Fields
[edit] public int configChanges
Bit mask of kinds of configuration changes that this activity can handle itself (without being restarted by the system). Contains any combination of CONFIG_FONT_SCALE, CONFIG_LOCALE, CONFIG_TOUCHSCREEN, CONFIG_KEYBOARD, CONFIG_NAVIGATION, and CONFIG_ORIENTATION. Set from the configChanges attribute.
[edit] public int flags
Options that have been set in the activity declaration in the manifest: MULTIPROCESS_FLAG, CLEAR_ON_BACKGROUND_FLAG, STATE_NOT_NEEDED_FLAG.
[edit] public int launchMode
The launch mode style requested by the activity. From the launchMode attribute, one of MULTIPLE_LAUNCH, SINGLE_TOP_LAUNCH, SINGLE_TASK_LAUNCH, or SINGLE_INSTANCE_LAUNCH.
[edit] public String permission
Optional name of a permission required to be able to access this Activity. From the "permission" attribute.
[edit] public String taskAffinity
The affinity this activity has for another task in the system. The string here is the name of the task, often the package name of the overall package. If null, the activity has no affinity. Specifying an affinity allows an activity to be migrated over to another task once the user has moved away from its current task. This comes from the "taskAffinity" attribute.
[edit] public int theme
A style resource identifier (in the package's resources) of this activity's theme. From the "theme" attribute or, if not set, 0.
[edit] Public Constructors
[edit] public ActivityInfo()
[edit] public ActivityInfo(ActivityInfo orig)
[edit] Public Methods
[edit] public void dump(Printer pw, String prefix)
[edit] public final int getThemeResource()
Return the theme resource identifier to use for this activity. If the activity defines a theme, that is used; else, the application theme is used.
Returns
- The theme associated with this activity.
[edit] public String toString()
Answers a string containing a concise, human-readable description of the receiver.
[edit] public void writeToParcel(Parcel dest)
[edit] References
- Original documentation page for Android SDK build m5-rc15e - 14 apr 2008 17:27
