page.title=<application> @jd:body
<application android:allowTaskReparenting=["true" | "false"] android:allowBackup=["true" | "false"] android:backupAgent="string" android:banner="drawable resource" android:debuggable=["true" | "false"] android:description="string resource" android:enabled=["true" | "false"] android:hasCode=["true" | "false"] android:hardwareAccelerated=["true" | "false"] android:icon="drawable resource" android:isGame=["true" | "false"] android:killAfterRestore=["true" | "false"] android:largeHeap=["true" | "false"] android:label="string resource" android:logo="drawable resource" android:manageSpaceActivity="string" android:name="string" android:permission="string" android:persistent=["true" | "false"] android:process="string" android:restoreAnyVersion=["true" | "false"] android:requiredAccountType="string" android:restrictedAccountType="string" android:supportsRtl=["true" | "false"] android:taskAffinity="string" android:testOnly=["true" | "false"] android:theme="resource or theme" android:uiOptions=["none" | "splitActionBarWhenNarrow"] android:vmSafeMode=["true" | "false"] > . . . </application>
<manifest>
<activity>
<activity-alias>
<meta-data>
<service>
<receiver>
<provider>
<uses-library>
The
<activity>
element has its own
allowTaskReparenting
attribute that can override the value set here. See that attribute for more
information.
<manifest>
element.
There is no default. The name must be specified.
<activity>
tag to supply a banner for a specific activity.
The system uses the banner to represent an app in the Android TV home screen. Since the banner is displayed only in the home screen, it should only be specified by applications with an activity that handles the {@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER} intent.
This attribute must be set as a reference to a drawable resource containing the image (for example {@code "@drawable/banner"}). There is no default banner.
See Banners in the UI Patterns for TV design guide, and Provide a home screen banner in Get Started with TV Apps for more information.
The default value is {@code "true"}.
An application would not have any code of its own only if it's using nothing but built-in component classes, such as an activity that uses the {@link android.app.AliasActivity} class, a rare occurrence.
Starting from Android 3.0 (API level 11), a hardware-accelerated OpenGL renderer is available to applications, to improve performance for many common 2D graphics operations. When the hardware-accelerated renderer is enabled, most operations in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated. This results in smoother animations, smoother scrolling, and improved responsiveness overall, even for applications that do not explicitly make use the framework's OpenGL libraries.
Note that not all of the OpenGL 2D operations are accelerated. If you enable the hardware-accelerated renderer, test your application to ensure that it can make use of the renderer without errors.
For more information, read the Hardware Acceleration guide.
<activity>
,
<activity-alias>
,
<service>
,
<receiver>
, and
<provider>
elements.
This attribute must be set as a reference to a drawable resource containing the image (for example {@code "@drawable/icon"}). There is no default icon.
The default is {@code false}.
The default is {@code true}, which means that after the application has finished processing its data during a full-system restore, it will be terminated.
Most apps should not need this and should instead focus on reducing their overall memory usage for improved performance. Enabling this also does not guarantee a fixed increase in available memory, because some devices are constrained by their total available memory.
To query the available memory size at runtime, use the methods {@link android.app.ActivityManager#getMemoryClass()} or {@link android.app.ActivityManager#getLargeMemoryClass()}.
<activity>
,
<activity-alias>
,
<service>
,
<receiver>
, and
<provider>
elements.
The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.
This attribute must be set as a reference to a drawable resource containing the image (for example {@code "@drawable/logo"}). There is no default logo.
<activity>
element.
The subclass is optional; most applications won't need one. In the absence of a subclass, Android uses an instance of the base Application class.
For more information on permissions, see the Permissions section in the introduction and another document, Security and Permissions.
By default, Android creates a process for an application when the first
of its components needs to run. All components then run in that process.
The name of the default process matches the package name set by the
<manifest>
element.
By setting this attribute to a process name that's shared with another application, you can arrange for components of both applications to run in the same process — but only if the two applications also share a user ID and be signed with the same certificate.
If the name assigned to this attribute begins with a colon (':'), a new process, private to the application, is created when it's needed. If the process name begins with a lowercase character, a global process of that name is created. A global process can be shared with other applications, reducing resource usage.
The default value of this attribute is {@code false}.
The default value is null and indicates that the application can work without any accounts.
Because restricted profiles currently cannot add accounts, specifying this attribute makes your app unavailable from a restricted profile unless you also declare {@code android:restrictedAccountType} with the same value.
Caution: If the account data may reveal personally identifiable information, it's important that you declare this attribute and leave {@code android:restrictedAccountType} null, so that restricted profiles cannot use your app to access personal information that belongs to the owner user.
This attribute was added in API level 18.
The default value is null and indicates that the application can work without any accounts.
Caution: Specifying this attribute allows restricted profiles to use your app with accounts that belong to the owner user, which may reveal personally identifiable information. If the account may reveal personal details, you should not use this attribute and you should instead declare the {@code android:requiredAccountType} attribute to make your app unavailable to restricted profiles.
This attribute was added in API level 18.
If set to {@code true} and {@code targetSdkVersion} is set to 17 or higher, various RTL APIs will be activated and used by the system so your app can display RTL layouts. If set to {@code false} or if {@code targetSdkVersion} is set to 16 or lower, the RTL APIs will be ignored or will have no effect and your app will behave the same regardless of the layout direction associated to the user's Locale choice (your layouts will always be left-to-right).
The default value of this attribute is {@code false}.
This attribute was added in API level 17.
taskAffinity
attributes. See that attribute for more information.
By default, all activities within an application share the same
affinity. The name of that affinity is the same as the package name
set by the
<manifest>
element.
theme
attributes. For more information, see the Styles and Themes developer guide.
Must be one of the following values.
Value | Description |
---|---|
{@code "none"} | No extra UI options. This is the default. |
{@code "splitActionBarWhenNarrow"} | Add a bar at the bottom of the screen to display action items in the {@link android.app.ActionBar}, when constrained for horizontal space (such as when in portrait mode on a handset). Instead of a small number of action items appearing in the action bar at the top of the screen, the action bar is split into the top navigation section and the bottom bar for action items. This ensures a reasonable amount of space is made available not only for the action items, but also for navigation and title elements at the top. Menu items are not split across the two bars; they always appear together. |
For more information about the action bar, see the Action Bar developer guide.
This attribute was added in API level 14.
<activity>
<service>
<receiver>
<provider>