summaryrefslogtreecommitdiffstats
path: root/docs/html/guide
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/guide')
-rw-r--r--docs/html/guide/components/activities.jd6
-rw-r--r--docs/html/guide/components/bound-services.jd6
-rw-r--r--docs/html/guide/components/fragments.jd9
-rw-r--r--docs/html/guide/components/processes-and-threads.jd7
-rw-r--r--docs/html/guide/components/services.jd8
-rw-r--r--docs/html/guide/components/tasks-and-back-stack.jd8
-rw-r--r--docs/html/guide/topics/manifest/activity-element.jd14
-rw-r--r--docs/html/guide/topics/manifest/uses-feature-element.jd13
-rw-r--r--docs/html/guide/topics/resources/providing-resources.jd4
-rw-r--r--docs/html/guide/topics/ui/accessibility/services.jd3
-rw-r--r--docs/html/guide/topics/ui/drag-drop.jd110
11 files changed, 76 insertions, 112 deletions
diff --git a/docs/html/guide/components/activities.jd b/docs/html/guide/components/activities.jd
index 1cbaa79..3de7eea 100644
--- a/docs/html/guide/components/activities.jd
+++ b/docs/html/guide/components/activities.jd
@@ -4,12 +4,6 @@ page.tags="activity","intent"
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>An activity provides a user interface for a single screen in your application</li>
- <li>Activities can move into the background and then be resumed with their state restored</li>
-</ul>
-
<h2>In this document</h2>
<ol>
<li><a href="#Creating">Creating an Activity</a>
diff --git a/docs/html/guide/components/bound-services.jd b/docs/html/guide/components/bound-services.jd
index 653c7a0..4215f0f 100644
--- a/docs/html/guide/components/bound-services.jd
+++ b/docs/html/guide/components/bound-services.jd
@@ -6,12 +6,6 @@ parent.link=services.html
<div id="qv-wrapper">
<ol id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>A bound service allows other components to bind to it, in order to interact with it and
-perform interprocess communication</li>
- <li>A bound service is destroyed once all clients unbind, unless the service was also started</li>
-</ul>
<h2>In this document</h2>
<ol>
<li><a href="#Basics">The Basics</a></li>
diff --git a/docs/html/guide/components/fragments.jd b/docs/html/guide/components/fragments.jd
index 32c9f99..0cc5f72 100644
--- a/docs/html/guide/components/fragments.jd
+++ b/docs/html/guide/components/fragments.jd
@@ -5,15 +5,6 @@ parent.link=activities.html
<div id="qv-wrapper">
<div id="qv">
-
- <h2>Quickview</h2>
- <ul>
- <li>Fragments decompose application functionality and UI into reusable modules</li>
- <li>Add multiple fragments to a screen to avoid switching activities</li>
- <li>Fragments have their own lifecycle, state, and back stack</li>
- <li>Fragments require API Level 11 or greater</li>
- </ul>
-
<h2>In this document</h2>
<ol>
<li><a href="#Design">Design Philosophy</a></li>
diff --git a/docs/html/guide/components/processes-and-threads.jd b/docs/html/guide/components/processes-and-threads.jd
index 1fed712..e297205 100644
--- a/docs/html/guide/components/processes-and-threads.jd
+++ b/docs/html/guide/components/processes-and-threads.jd
@@ -5,13 +5,6 @@ page.tags="lifecycle","background"
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>Every application runs in its own process and all components of the application run in that
-process, by default</li>
- <li>Any slow, blocking operations in an activity should be done in a new thread, to avoid slowing
-down the user interface</li>
-</ul>
<h2>In this document</h2>
<ol>
diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd
index da01d2c..6e22be8 100644
--- a/docs/html/guide/components/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -3,14 +3,6 @@ page.title=Services
<div id="qv-wrapper">
<ol id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>A service can run in the background to perform work even while the user is in a different
-application</li>
- <li>A service can allow other components to bind to it, in order to interact with it and
-perform interprocess communication</li>
- <li>A service runs in the main thread of the application that hosts it, by default</li>
-</ul>
<h2>In this document</h2>
<ol>
<li><a href="#Basics">The Basics</a></li>
diff --git a/docs/html/guide/components/tasks-and-back-stack.jd b/docs/html/guide/components/tasks-and-back-stack.jd
index f818873..e054313 100644
--- a/docs/html/guide/components/tasks-and-back-stack.jd
+++ b/docs/html/guide/components/tasks-and-back-stack.jd
@@ -5,14 +5,6 @@ parent.link=activities.html
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>All activities belong to a task</li>
- <li>A task contains a collection of activities in the order in which the user interacts with
-them</li>
- <li>Tasks can move to the background and retain the state of each activity in order for users
-to perform other tasks without losing their work</li>
-</ul>
<h2>In this document</h2>
<ol>
diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd
index bd1edc2..a8d7615 100644
--- a/docs/html/guide/topics/manifest/activity-element.jd
+++ b/docs/html/guide/topics/manifest/activity-element.jd
@@ -5,7 +5,8 @@ parent.link=manifest-intro.html
<dl class="xml">
<dt>syntax:</dt>
-<dd><pre class="stx">&lt;activity android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
+<dd><pre class="stx">&lt;activity android:<a href="#embedded">allowEmbedded</a>=["true" | "false"]
+ android:<a href="#reparent">allowTaskReparenting</a>=["true" | "false"]
android:<a href="#always">alwaysRetainTaskState</a>=["true" | "false"]
android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"]
android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale",
@@ -62,6 +63,17 @@ by the system and will never be run.
<dt>attributes:</dt>
<dd><dl class="attr">
+<dt><a name="embedded"></a>{@code android:allowEmbedded}</dt>
+<dd>
+ Indicate that the activity can be launched as the embedded child of another
+ activity. Particularly in the case where the child lives in a container
+ such as a Display owned by another activity. For example, activities
+ that are used for Wear custom notifications must declare this so
+ Wear can display the activity in it's context stream, which resides
+ in another process.
+
+ <p>The default value of this attribute is <code>false</code>.
+</dd>
<dt><a name="reparent"></a>{@code android:allowTaskReparenting}</dt>
<dd>Whether or not the activity can move from the task that started it to
the task it has an affinity for when that task is next brought to the
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 814396c..ca954fe 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -584,9 +584,14 @@ is sensitive to delays or lag in sound input or output.</td>
</tr>
<tr>
<td><code>android.hardware.camera.any</code></td>
- <td>The application uses at least one camera facing in any direction. Use this
-in preference to <code>android.hardware.camera</code> if a back-facing camera is
-not required.</td>
+ <td>The application uses at least one camera facing in any direction, or an
+external camera device if one is connected. Use this in preference to
+<code>android.hardware.camera</code> if a back-facing camera is not required.
+ </td>
+</tr>
+<tr>
+ <td><code>android.hardware.camera.external</code></td>
+ <td>The application uses an external camera device if one is connected.</td>
</tr>
<tr>
@@ -1099,4 +1104,4 @@ filtering based on the <code>CAMERA</code> permission, you would add this
<td><code>android.hardware.wifi</code></td>
<!-- <td></td> -->
</tr>
-</table> \ No newline at end of file
+</table>
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index aec7fa7..bf16630 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -562,6 +562,7 @@ which indicates the current device orientation.</p>
<code>desk</code><br/>
<code>television<br/>
<code>appliance</code>
+ <code>watch</code>
</td>
<td>
<ul class="nolist">
@@ -573,8 +574,9 @@ which indicates the current device orientation.</p>
non-pointer interaction</li>
<li>{@code appliance}: Device is serving as an appliance, with
no display</li>
+ <li>{@code watch}: Device has a display and is worn on the wrist</li>
</ul>
- <p><em>Added in API level 8, television added in API 13.</em></p>
+ <p><em>Added in API level 8, television added in API 13, watch added in API 20.</em></p>
<p>For information about how your app can respond when the device is inserted into or
removed from a dock, read <a
href="{@docRoot}training/monitoring-device-state/docking-monitoring.html">Determining
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index 4bd752f..c868080 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -81,7 +81,8 @@ as shown in the following sample:</p>
<pre>
&lt;application&gt;
&lt;service android:name=&quot;.MyAccessibilityService&quot;
- android:label=&quot;@string/accessibility_service_label&quot;&gt;
+ android:label=&quot;@string/accessibility_service_label&quot;
+ android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
&lt;intent-filter&gt;
&lt;action android:name=&quot;android.accessibilityservice.AccessibilityService&quot; /&gt;
&lt;/intent-filter&gt;
diff --git a/docs/html/guide/topics/ui/drag-drop.jd b/docs/html/guide/topics/ui/drag-drop.jd
index e989374..9a6b0e9 100644
--- a/docs/html/guide/topics/ui/drag-drop.jd
+++ b/docs/html/guide/topics/ui/drag-drop.jd
@@ -873,7 +873,7 @@ imageView.setOnDragListener(mDragListen);
...
-protected class myDragEventListener implements View.OnDragEventListener {
+protected class myDragEventListener implements View.OnDragListener {
// This is the method that the system calls when it dispatches a drag event to the
// listener.
@@ -899,18 +899,15 @@ protected class myDragEventListener implements View.OnDragEventListener {
v.invalidate();
// returns true to indicate that the View can accept the dragged data.
- return(true);
+ return true;
- } else {
+ }
- // Returns false. During the current drag and drop operation, this View will
- // not receive events again until ACTION_DRAG_ENDED is sent.
- return(false);
+ // Returns false. During the current drag and drop operation, this View will
+ // not receive events again until ACTION_DRAG_ENDED is sent.
+ return false;
- }
- break;
-
- case DragEvent.ACTION_DRAG_ENTERED: {
+ case DragEvent.ACTION_DRAG_ENTERED:
// Applies a green tint to the View. Return true; the return value is ignored.
@@ -919,79 +916,70 @@ protected class myDragEventListener implements View.OnDragEventListener {
// Invalidate the view to force a redraw in the new tint
v.invalidate();
- return(true);
-
- break;
+ return true;
- case DragEvent.ACTION_DRAG_LOCATION:
+ case DragEvent.ACTION_DRAG_LOCATION:
// Ignore the event
- return(true);
-
- break;
-
- case DragEvent.ACTION_DRAG_EXITED:
-
- // Re-sets the color tint to blue. Returns true; the return value is ignored.
- v.setColorFilter(Color.BLUE);
-
- // Invalidate the view to force a redraw in the new tint
- v.invalidate();
+ return true;
- return(true);
+ case DragEvent.ACTION_DRAG_EXITED:
- break;
-
- case DragEvent.ACTION_DROP:
+ // Re-sets the color tint to blue. Returns true; the return value is ignored.
+ v.setColorFilter(Color.BLUE);
- // Gets the item containing the dragged data
- ClipData.Item item = event.getClipData().getItemAt(0);
+ // Invalidate the view to force a redraw in the new tint
+ v.invalidate();
- // Gets the text data from the item.
- dragData = item.getText();
+ return true;
- // Displays a message containing the dragged data.
- Toast.makeText(this, "Dragged data is " + dragData, Toast.LENGTH_LONG);
+ case DragEvent.ACTION_DROP:
- // Turns off any color tints
- v.clearColorFilter();
+ // Gets the item containing the dragged data
+ ClipData.Item item = event.getClipData().getItemAt(0);
- // Invalidates the view to force a redraw
- v.invalidate();
+ // Gets the text data from the item.
+ dragData = item.getText();
- // Returns true. DragEvent.getResult() will return true.
- return(true);
+ // Displays a message containing the dragged data.
+ Toast.makeText(this, "Dragged data is " + dragData, Toast.LENGTH_LONG);
- break;
+ // Turns off any color tints
+ v.clearColorFilter();
- case DragEvent.ACTION_DRAG_ENDED:
+ // Invalidates the view to force a redraw
+ v.invalidate();
- // Turns off any color tinting
- v.clearColorFilter();
+ // Returns true. DragEvent.getResult() will return true.
+ return true;
- // Invalidates the view to force a redraw
- v.invalidate();
+ case DragEvent.ACTION_DRAG_ENDED:
- // Does a getResult(), and displays what happened.
- if (event.getResult()) {
- Toast.makeText(this, "The drop was handled.", Toast.LENGTH_LONG);
+ // Turns off any color tinting
+ v.clearColorFilter();
- } else {
- Toast.makeText(this, "The drop didn't work.", Toast.LENGTH_LONG);
+ // Invalidates the view to force a redraw
+ v.invalidate();
- };
+ // Does a getResult(), and displays what happened.
+ if (event.getResult()) {
+ Toast.makeText(this, "The drop was handled.", Toast.LENGTH_LONG);
- // returns true; the value is ignored.
- return(true);
+ } else {
+ Toast.makeText(this, "The drop didn't work.", Toast.LENGTH_LONG);
- break;
+ }
- // An unknown action type was received.
- default:
- Log.e("DragDrop Example","Unknown action type received by OnDragListener.");
+ // returns true; the value is ignored.
+ return true;
+ // An unknown action type was received.
+ default:
+ Log.e("DragDrop Example","Unknown action type received by OnDragListener.");
break;
- };
- };
+ }
+
+ return false;
+ }
};
</pre>