summaryrefslogtreecommitdiffstats
path: root/docs/html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/guide/topics/manifest/manifest-element.jd5
-rw-r--r--docs/html/guide/topics/manifest/uses-feature-element.jd76
-rw-r--r--docs/html/guide/topics/resources/menu-resource.jd144
3 files changed, 155 insertions, 70 deletions
diff --git a/docs/html/guide/topics/manifest/manifest-element.jd b/docs/html/guide/topics/manifest/manifest-element.jd
index a35c5a1..7f21e6b 100644
--- a/docs/html/guide/topics/manifest/manifest-element.jd
+++ b/docs/html/guide/topics/manifest/manifest-element.jd
@@ -159,6 +159,9 @@ multiple SD cards can be used with the same device.</li>
storage. However, the system will not allow the user to move the application to external storage if
this attribute is set to {@code internalOnly}, which is the default setting.</p>
+<p>Read <a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a> for
+more information about using this attribute (including how to maintain backward compatibility).</p>
+
<p>Introduced in: API Level 8.</p>
@@ -173,7 +176,7 @@ this attribute is set to {@code internalOnly}, which is the default setting.</p>
<p>
<dt>see also:</dt>
-<dd><a href="{@docRoot}guide/appendix/install-location.html">App Install Location</a><br/>
+<dd>
<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code></dd>
</dl>
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 45f4a66..b5b30f6 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -472,11 +472,11 @@ If you are developing in Eclipse with ADT, right-click the project and select
Package</strong>. Select a destination filename and path and click
<strong>OK</strong>. </li>
<li>Next, locate the <code>aapt</code> tool, if it is not already in your PATH.
-If you are using SDK Tools r7 or earlier, you can find <code>aapt</code> in the
-<code>&lt;<em>SDK</em>&gt;/platforms/android-&lt;<em>platform</em>&gt;/tools/</code> directory.
+If you are using SDK Tools r8 or higher, you can find <code>aapt</code> in the
+<code>&lt;<em>SDK</em>&gt;/platform-tools/</code> directory.
<p class="note"><strong>Note:</strong> You must use the version of
-<code>aapt</code> that is provided for the latest platform release available. If
-you do not have the latest platform release, download it using the <a
+<code>aapt</code> that is provided for the latest Platform-Tools component available. If
+you do not have the latest Platform-Tools component, download it using the <a
href="{@docRoot}sdk/adding-components.html">Android SDK and AVD Manager</a>.
</p></li>
<li>Run <code>aapt</code> using this syntax: </li>
@@ -522,6 +522,14 @@ in a separate <code>&lt;uses-feature&gt;</code> element. </p>
<th>Comments</th>
</tr>
<tr>
+ <td>Audio</td>
+ <td><code>android.hardware.audio.low_latency</td>
+ <td>The application uses a low-latency audio pipeline on the device and
+is sensitive to delays or lag in sound input or output.</td>
+<td>
+</td>
+ </tr>
+ <tr>
<td>Bluetooth</td>
<td><code>android.hardware.bluetooth</td>
<td>The application uses Bluetooth radio features in the device.</td>
@@ -529,7 +537,7 @@ in a separate <code>&lt;uses-feature&gt;</code> element. </p>
</td>
</tr>
<tr>
- <td rowspan="3">Camera</td>
+ <td rowspan="4">Camera</td>
<td><code>android.hardware.camera</code></td>
<td>The application uses the device's camera. If the device supports
multiple cameras, the application uses the camera that facing
@@ -539,7 +547,7 @@ in a separate <code>&lt;uses-feature&gt;</code> element. </p>
<tr>
<td><code>android.hardware.camera.autofocus</code></td>
<td>Subfeature. The application uses the device camera's autofocus capability.</td>
- <td rowspan="2">If declared with the <code>"android:required="true"</code>
+ <td rowspan="3">If declared with the <code>"android:required="true"</code>
attribute, these subfeatures implicitly declare the
<code>android.hardware.camera</code> parent feature. </td>
</tr>
@@ -547,6 +555,10 @@ attribute, these subfeatures implicitly declare the
<td><code>android.hardware.camera.flash</code></td>
<td>Subfeature. The application uses the device camera's flash.</td>
</tr>
+<tr>
+ <td><code>android.hardware.camera.front</code></td>
+ <td>Subfeature. The application uses a front-facing camera on the device.</td>
+</tr>
<tr>
<td rowspan="3">Location</td>
@@ -568,21 +580,43 @@ attribute, these subfeatures implicitly declare the
<td>Subfeature. The application uses precise location coordinates obtained
from a Global Positioning System receiver on the device. </td>
</tr>
-
<tr>
- <td rowspan="4">Sensors</td>
+ <td>Microphone</td>
+ <td><code>android.hardware.microphone</code></td>
+ <td>The application uses a microphone on the device.
+ </td>
+ <td></td>
+</tr>
+<tr>
+ <td>Near Field Communications</td>
+ <td><code>android.hardware.nfc</td>
+ <td>The application uses NFC radio features in the device.</td>
+ <td></td>
+</tr>
+<tr>
+ <td rowspan="6">Sensors</td>
<td><code>android.hardware.sensor.accelerometer</code></td>
<td>The application uses motion readings from an accelerometer on the
device.</td>
<td></td>
</tr>
<tr>
+ <td><code>android.hardware.sensor.barometer</code></td>
+ <td>The application uses the device's barometer.</td>
+ <td></td>
+</tr>
+<tr>
<td><code>android.hardware.sensor.compass</code></td>
<td>The application uses directional readings from a magnetometer (compass) on
the device.</td>
<td></td>
</tr>
<tr>
+ <td><code>android.hardware.sensor.gyroscope</code></td>
+ <td>The application uses the device's gyroscope sensor.</td>
+ <td></td>
+</tr>
+<tr>
<td><code>android.hardware.sensor.light</code></td>
<td>The application uses the device's light sensor.</td>
<td></td>
@@ -593,12 +627,20 @@ the device.</td>
<td></td>
</tr>
<tr>
- <td>Microphone</td>
- <td><code>android.hardware.microphone</code></td>
- <td>The application uses a microphone on the device.
+ <td rowspan="2">SIP/VOIP</td>
+ <td><code>android.hardware.sip</code></td>
+ <td>The application uses SIP service on the device.
</td>
<td></td>
</tr>
+<tr>
+ <td><code>android.hardware.sip.voip</code></td>
+ <td>Subfeature. The application uses SIP-based VOIP service on the device.
+ </td>
+ <td>If declared with the <code>"android:required="true"</code> attribute, this
+subfeature implicitly declares the <code>android.hardware.sip</code>
+parent feature.</td>
+</tr>
<tr>
<td rowspan="3">Telephony</td>
@@ -622,14 +664,14 @@ device.</td>
</tr>
<tr>
- <td rowspan="3">Touchscreen</td>
+ <td rowspan="4">Touchscreen</td>
<td><code>android.hardware.touchscreen</code></td>
<td>The application uses touchscreen capabilities on the device.</td>
<td></td>
</tr>
<tr>
<td><code>android.hardware.touchscreen.multitouch</code></td>
- <td>The application uses basic two-point multitouch capabilities on the device
+ <td>Subfeature. The application uses basic two-point multitouch capabilities on the device
screen.</td>
<td>If declared with the <code>"android:required="true"</code> attribute, this
subfeature implicitly declares the <code>android.hardware.touchscreen</code>
@@ -640,10 +682,16 @@ parent feature. </td>
<td>Subfeature. The application uses advanced multipoint multitouch
capabilities on the device screen, such as for tracking two or more points fully
independently.</td>
- <td>If declared with the <code>"android:required="true"</code> attribute, this
+ <td rowspan="2">If declared with the <code>"android:required="true"</code> attribute, this
subfeature implicitly declares the
<code>android.hardware.touchscreen.multitouch</code> parent feature. </td>
</tr>
+<tr>
+ <td><code>android.hardware.touchscreen.multitouch.jazzhand</code></td>
+ <td>Subfeature. The application uses advanced multipoint multitouch
+capabilities on the device screen, for tracking up to five points fully
+independently.</td>
+</tr>
<tr>
<td>Wifi</td>
diff --git a/docs/html/guide/topics/resources/menu-resource.jd b/docs/html/guide/topics/resources/menu-resource.jd
index cde72bd..7bcd78a 100644
--- a/docs/html/guide/topics/resources/menu-resource.jd
+++ b/docs/html/guide/topics/resources/menu-resource.jd
@@ -36,22 +36,23 @@ In XML: <code>@[<em>package</em>:]menu.<em>filename</em></code>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;<a href="#menu-element">menu</a> xmlns:android="http://schemas.android.com/apk/res/android">
&lt;<a href="#item-element">item</a> android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
- android:menuCategory=["container" | "system" | "secondary" | "alternative"]
- android:orderInCategory="<em>integer</em>"
android:title="<em>string</em>"
android:titleCondensed="<em>string</em>"
android:icon="@[package:]drawable/<em>drawable_resource_name</em>"
+ android:showAsAction=["ifRoom" | "never" | "withText" | "always"]
android:alphabeticShortcut="<em>string</em>"
android:numericShortcut="<em>string</em>"
android:checkable=["true" | "false"]
android:visible=["visible" | "invisible" | "gone"]
- android:enabled=["enabled" | "disabled"] /&gt;
+ android:enabled=["enabled" | "disabled"]
+ android:menuCategory=["container" | "system" | "secondary" | "alternative"]
+ android:orderInCategory="<em>integer</em>" /&gt;
&lt;<a href="#group-element">group</a> android:id="@[+][<em>package</em>:]id/<em>resource name</em>"
- android:menuCategory=["container" | "system" | "secondary" | "alternative"]
- android:orderInCategory="<em>integer</em>"
android:checkableBehavior=["none" | "all" | "single"]
android:visible=["visible" | "invisible" | "gone"]
- android:enabled=["enabled" | "disabled"] &gt;
+ android:enabled=["enabled" | "disabled"]
+ android:menuCategory=["container" | "system" | "secondary" | "alternative"]
+ android:orderInCategory="<em>integer</em>" &gt;
&lt;<a href="#item-element">item</a> /&gt;
&lt;/group&gt;
&lt;<a href="#item-element">item</a> &gt;
@@ -77,91 +78,120 @@ In XML: <code>@[<em>package</em>:]menu.<em>filename</em></code>
<code>"http://schemas.android.com/apk/res/android"</code>.
</dl>
</dd>
- <dt id="group-element"><code>&lt;group&gt;</code></dt>
- <dd>A menu group (to create a collection of items that share traits, such as whether they are
-visible, enabled, or checkable). Contains one or more <code>&lt;item&gt;</code> elements. Must be a
-child of a <code>&lt;menu&gt;</code> element.
+
+ <dt id="item-element"><code>&lt;item&gt;</code></dt>
+ <dd>A menu item. May contain a <code>&lt;menu&gt;</code> element (for a Sub
+ Menu). Must be a child of a <code>&lt;menu&gt;</code> or <code>&lt;group&gt;</code> element.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>android:id</code></dt>
<dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item, use the form:
-<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new ID.</dd>
+<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new
+ID.</dd>
+ <dt><code>android:title</code></dt>
+ <dd><em>String</em>. The menu title.</dd>
+ <dt><code>android:titleCondensed</code></dt>
+ <dd><em>String</em>. A condensed title, for situations in which the normal title is
+too long.</dd>
+ <dt><code>android:icon</code></dt>
+ <dd><em>Drawable resource</em>. An image to be used as the menu item icon.</dd>
+
+ <dt><code>android:showAsAction</code></dt>
+ <dd><em>Keyword</em>. When and how this item should appear as an action item in the Action
+Bar. A menu item can appear as an action item only when the activity includes an {@link
+android.app.ActionBar} (introduced in API Level HONEYCOMB). Valid values:
+ <table>
+ <tr><th>Value</th><th>Description</th></tr>
+ <tr><td><code>ifRoom</code></td><td>Only place this item in the Action Bar if
+there is room for it.</td></tr>
+ <tr><td><code>withText</code></td><td>Also include the title text (defined
+by {@code android:title}) with the action item. You can include this value along with one
+of the others as a flag set, by separating them with a pipe {@code |}.</td></tr>
+ <tr><td><code>never</code></td><td>Never place this item in the Action Bar.</td></tr>
+ <tr><td><code>always</code></td><td>Always place this item in the Action Bar.
+Avoid using this unless it's critical that the item always appear in the action
+bar. Setting multiple items to always appear as action items can result in them overlapping
+with other UI in the action bar.</td></tr>
+ </table>
+ <p>See <a href="{@docRoot}guide/topics/ui/actionbar.html">Using the Action Bar</a> for
+more information.</p>
+ <p>Introduced in API Level HONEYCOMB.</p>
+ </dd>
+
+ <dt><code>android:alphabeticShortcut</code></dt>
+ <dd><em>Char</em>. A character for the alphabetic shortcut key.</dd>
+ <dt><code>android:numericShortcut</code></dt>
+ <dd><em>Integer</em>. A number for the numeric shortcut key.</dd>
+ <dt><code>android:checkable</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is checkable.</dd>
+ <dt><code>android:checked</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is checked by default.</dd>
+ <dt><code>android:visible</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is visible by default.</dd>
+ <dt><code>android:enabled</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is enabled by default.</dd>
<dt><code>android:menuCategory</code></dt>
<dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
- constants, which define the group's priority. Valid values:
+ constants, which define the item's priority. Valid values:
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td><code>container</code></td><td>For groups that are part of a
+ <tr><td><code>container</code></td><td>For items that are part of a
container.</td></tr>
- <tr><td><code>system</code></td><td>For groups that are provided by the
+ <tr><td><code>system</code></td><td>For items that are provided by the
system.</td></tr>
- <tr><td><code>secondary</code></td><td>For groups that are user-supplied secondary
+ <tr><td><code>secondary</code></td><td>For items that are user-supplied secondary
(infrequently used) options.</td></tr>
- <tr><td><code>alternative</code></td><td>For groups that are alternative actions
+ <tr><td><code>alternative</code></td><td>For items that are alternative actions
on the data that is currently displayed.</td></tr>
</table>
</dd>
<dt><code>android:orderInCategory</code></dt>
- <dd><em>Integer</em>. The default order of the items within the category.</dd>
+ <dd><em>Integer</em>. The order of "importance" of the item, within a group.</dd>
+ </dl>
+ </dd>
+
+ <dt id="group-element"><code>&lt;group&gt;</code></dt>
+ <dd>A menu group (to create a collection of items that share traits, such as whether they are
+visible, enabled, or checkable). Contains one or more <code>&lt;item&gt;</code> elements. Must be a
+child of a <code>&lt;menu&gt;</code> element.
+ <p class="caps">attributes:</p>
+ <dl class="atn-list">
+ <dt><code>android:id</code></dt>
+ <dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item,
+use the form:
+<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new
+ID.</dd>
<dt><code>android:checkableBehavior</code></dt>
<dd><em>Keyword</em>. The type of checkable behavior for the group. Valid values:
<table>
<tr><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>Not checkable</td></tr>
<tr><td><code>all</code></td><td>All items can be checked (use checkboxes)</td></tr>
- <tr><td><code>single</code></td><td>Only one item can be checked (use radio buttons)</td></tr>
+ <tr><td><code>single</code></td><td>Only one item can be checked (use radio
+buttons)</td></tr>
</table>
</dd>
<dt><code>android:visible</code></dt>
<dd><em>Boolean</em>. "true" if the group is visible.</dd>
<dt><code>android:enabled</code></dt>
<dd><em>Boolean</em>. "true" if the group is enabled.</dd>
- </dl>
- </dd>
- <dt id="item-element"><code>&lt;item&gt;</code></dt>
- <dd>A menu item. May contain a <code>&lt;menu&gt;</code> element (for a Sub
- Menu). Must be a child of a <code>&lt;menu&gt;</code> or <code>&lt;group&gt;</code> element.
- <p class="caps">attributes:</p>
- <dl class="atn-list">
- <dt><code>android:id</code></dt>
- <dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item, use the form:
-<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new ID.</dd>
<dt><code>android:menuCategory</code></dt>
<dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
- constants, which define the item's priority. Valid values:
+ constants, which define the group's priority. Valid values:
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td><code>container</code></td><td>For items that are part of a
+ <tr><td><code>container</code></td><td>For groups that are part of a
container.</td></tr>
- <tr><td><code>system</code></td><td>For items that are provided by the
+ <tr><td><code>system</code></td><td>For groups that are provided by the
system.</td></tr>
- <tr><td><code>secondary</code></td><td>For items that are user-supplied secondary
+ <tr><td><code>secondary</code></td><td>For groups that are user-supplied secondary
(infrequently used) options.</td></tr>
- <tr><td><code>alternative</code></td><td>For items that are alternative actions
+ <tr><td><code>alternative</code></td><td>For groups that are alternative actions
on the data that is currently displayed.</td></tr>
</table>
</dd>
<dt><code>android:orderInCategory</code></dt>
- <dd><em>Integer</em>. The order of "importance" of the item, within a group.</dd>
- <dt><code>android:title</code></dt>
- <dd><em>String</em>. The menu title.</dd>
- <dt><code>android:titleCondensed</code></dt>
- <dd><em>String</em>. A condensed title, for situations in which the normal title is
-too long.</dd>
- <dt><code>android:icon</code></dt>
- <dd><em>Drawable resource</em>. An image to be used as the menu item icon.</dd>
- <dt><code>android:alphabeticShortcut</code></dt>
- <dd><em>Char</em>. A character for the alphabetic shortcut key.</dd>
- <dt><code>android:numericShortcut</code></dt>
- <dd><em>Integer</em>. A number for the numeric shortcut key.</dd>
- <dt><code>android:checkable</code></dt>
- <dd><em>Boolean</em>. "true" if the item is checkable.</dd>
- <dt><code>android:checked</code></dt>
- <dd><em>Boolean</em>. "true" if the item is checked by default.</dd>
- <dt><code>android:visible</code></dt>
- <dd><em>Boolean</em>. "true" if the item is visible by default.</dd>
- <dt><code>android:enabled</code></dt>
- <dd><em>Boolean</em>. "true" if the item is enabled by default.</dd>
+ <dd><em>Integer</em>. The default order of the items within the category.</dd>
</dl>
</dd>
</dl>
@@ -174,7 +204,8 @@ too long.</dd>
&lt;menu xmlns:android="http://schemas.android.com/apk/res/android">
&lt;item android:id="@+id/item1"
android:title="@string/item1"
- android:icon="@drawable/group_item1_icon" />
+ android:icon="@drawable/group_item1_icon"
+ android:showAsAction="ifRoom|withText"/>
&lt;group android:id="@+id/group">
&lt;item android:id="@+id/group_item1"
android:title="@string/group_item1"
@@ -184,7 +215,8 @@ too long.</dd>
android:icon="@drawable/group_item2_icon" />
&lt;/group>
&lt;item android:id="@+id/submenu"
- android:title="@string/submenu_title" >
+ android:title="@string/submenu_title"
+ android:showAsAction="ifRoom|withText" >
&lt;menu>
&lt;item android:id="@+id/submenu_item1"
android:title="@string/submenu_item1" />
@@ -201,6 +233,8 @@ public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
</pre>
+<p class="note"><strong>Note:</strong> The {@code android:showAsAction} attribute is
+available only on Android X.X (API Level HONEYCOMB) and greater.</p>
</dd> <!-- end example -->