summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/Activity.java4
-rw-r--r--docs/html/_redirects.yaml2
-rw-r--r--docs/html/develop/index.jd71
-rw-r--r--docs/html/preview/features/multi-window.jd4
-rw-r--r--docs/html/wear/preview/_book.yaml7
-rw-r--r--docs/html/wear/preview/features/ime.jd131
6 files changed, 167 insertions, 52 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index a5565638278c..b772bc9db65f 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1593,10 +1593,6 @@ public class Activity extends ContextThemeWrapper
* receive either {@link #onRestart}, {@link #onDestroy}, or nothing,
* depending on later user activity.
*
- * <p>Note that this method may never be called, in low memory situations
- * where the system does not have enough memory to keep your activity's
- * process running after its {@link #onPause} method is called.
- *
* <p><em>Derived classes must call through to the super class's
* implementation of this method. If they do not, an exception will be
* thrown.</em></p>
diff --git a/docs/html/_redirects.yaml b/docs/html/_redirects.yaml
index a5a46133d0d6..72e1e1479d6a 100644
--- a/docs/html/_redirects.yaml
+++ b/docs/html/_redirects.yaml
@@ -46,7 +46,7 @@ redirects:
- from: /tools/sdk/index.html
to: /studio/index.html
- from: /tools/index.html
- to: /tools-moved.html
+ to: /studio/index.html
- from: /tools/sdk/installing.html
to: /studio/index.html
- from: /tools/eclipse/installing-adt.html
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index 6835beb49aee..fb86295e0ec1 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -9,61 +9,44 @@ tabbedList=1
excludeFromSuggestions=true
@jd:body
-<section class="dac-expand dac-hero dac-section-light">
+
+ <section class="dac-expand dac-hero dac-light">
<div class="wrap">
<div class="cols dac-hero-content">
<div class="col-1of2 col-push-1of2 dac-hero-figure">
- <!--
- <iframe width="448" height="252"
- src="//www.youtube.com/embed/Z98hXV9GmzY?autohide=1&amp;showinfo=0"
- frameborder="0" allowfullscreen=""
- style="float: right;"></iframe>
- -->
- <a href="{@docRoot}studio/index.html">
- <img class="dac-hero-image" src="{@docRoot}images/tools/studio/studio-feature-instant-run_2x.png" />
- </a>
+ <img class="dac-hero-image" src="/images/develop/hero_image_studio5_2x.png" srcset="/images/develop/hero_image_studio5.png 1x, /images/develop/hero_image_studio5_2x.png 2x">
</div>
- <div class="col-1of2 col-pull-1of2">
+ <div class="col-1of2 col-pull-1of2" style="margin-bottom:40px">
<h1 class="dac-hero-title">
<a style="color:inherit" href="{@docRoot}studio/index.html">
Android Studio 2.1,<br>now available!</a></h1>
- <p class="dac-hero-description">
- The latest version of Android Studio is the biggest update yet.
- It includes new features like <strong>Instant Run</strong>, which
- dramatically speeds up your edit, build, and run cycles, keeping
- you "in the flow."</p>
- </p>
- <div class="cols">
- <div class="col-1of2">
- <a class="dac-hero-cta" href="{@docRoot}studio/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- Get Android Studio
- </a><br>
- <a class="dac-hero-cta" href="{@docRoot}training/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- Build your first app
- </a>
- </div>
- <div class="col-1of2">
- <a class="dac-hero-cta" href="{@docRoot}guide/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- Learn about Android
- </a><br>
- <a class="dac-hero-cta" href="{@docRoot}samples/index.html">
- <span class="dac-sprite dac-auto-chevron"></span>
- See sample projects
- </a>
- </div>
+
+<p class="dac-hero-description">Android Studio provides the fastest tools for
+building apps on every type of Android device.</p>
+
+<p class="dac-hero-description">The latest version, Android Studio 2.1, adds
+support for N Preview development on top of the faster Android Emulator and
+Instant Run feature from 2.0.</p>
+
+<div class="cols">
+ <div class="col-1of2">
+ <a class="dac-hero-cta" href="{@docRoot}studio/index.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Get Android Studio
+ </a>
+ </div>
+ <div class="col-1of2">
+ <a class="dac-hero-cta" href="{@docRoot}studio/releases/index.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ See the release notes</a>
+ </div>
+</div>
+
</div>
</div>
- <!--<div class="dac-section dac-small">
- <div class="resource-widget resource-flow-layout col-16"
- data-query="collection:develop/landing/mainlinks"
- data-cardSizes="6x2"
- data-maxResults="6"></div>
- </div>-->
</div>
</section>
+
<div class="wrap dac-offset-parent">
<a class="dac-fab dac-scroll-button" data-scroll-button href="#latest">
<i class="dac-sprite dac-arrow-down-gray"></i>
diff --git a/docs/html/preview/features/multi-window.jd b/docs/html/preview/features/multi-window.jd
index 0773b329bd7f..fec016861e80 100644
--- a/docs/html/preview/features/multi-window.jd
+++ b/docs/html/preview/features/multi-window.jd
@@ -138,7 +138,9 @@ page.keywords="multi-window", "android N", "split screen", "free-form"
When the user puts an app into multi-window mode, the system notifies the
activity of a configuration change, as specified in <a href=
"{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
- Changes</a>. Essentially, this change has the same activity-lifecycle
+ Changes</a>. This also happens when the user resizes the app, or puts the app
+ back into full-screen mode.
+ Essentially, this change has the same activity-lifecycle
implications as when the system notifies the app that the device has switched
from portrait to landscape mode, except that the device dimensions are
changed instead of just being swapped. As discussed in <a href=
diff --git a/docs/html/wear/preview/_book.yaml b/docs/html/wear/preview/_book.yaml
index 285073c76e64..a68729427e48 100644
--- a/docs/html/wear/preview/_book.yaml
+++ b/docs/html/wear/preview/_book.yaml
@@ -8,8 +8,10 @@ toc:
- title: API Overview
path: /wear/preview/api-overview.html
section:
- - title: Expanded Notifications
+ - title: Notification Improvements
path: /wear/preview/features/notifications.html
+ - title: Input Method Framework
+ path: /wear/preview/features/ime.html
- title: Complications
path: /wear/preview/features/complications.html
- title: Wear Navigation and Actions
@@ -25,3 +27,6 @@ toc:
- title: License Agreement
path: /wear/preview/license.html
+
+- title: Support and Release Notes
+ path: /wear/preview/support.html
diff --git a/docs/html/wear/preview/features/ime.jd b/docs/html/wear/preview/features/ime.jd
index dc4adf1771b2..4ee507c3c8fd 100644
--- a/docs/html/wear/preview/features/ime.jd
+++ b/docs/html/wear/preview/features/ime.jd
@@ -4,4 +4,133 @@ page.tags="wear"
@jd:body
-<p>stub</p> \ No newline at end of file
+
+<div id="qv-wrapper">
+<div id="qv">
+
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#creating">Creating an Input Method for Wear</a></li>
+ <li><a href="#invoking">Invoking IME</a></li>
+ <li><a href="#considerations">General IME Considerations</a></li>
+ <li><a href="#test">Testing your IME</a></li>
+ </ol>
+
+</div>
+</div>
+
+
+<p>Wear 2.0 supports input methods beyond voice by extending the Android
+Input Method Framework (IMF) to Android Wear. IMF allows for virtual, on-screen
+ keyboards and other input methods to be used for text entry. The IMF APIs used
+ for Wear devices are the same as other form factors, though usage is slightly
+ different due to limited screen real estate.</p>
+
+<p>Wear 2.0 comes with the system default Input Method Editor (IME)
+and opens up the IMF APIs for third-party developers to create custom input
+methods for Wear.
+</p>
+
+
+<h2 id="creating">Creating an Input Method for Wear</h2>
+
+<p>To create an input method for Wear,
+see <a href="http://developer.android.com/guide/topics/text/creating-input-method.html">Creating an Input Method</a>.
+</p>
+
+<h2 id="invoking">Invoking IME</h2>
+If you are developing an IME for Wear, remember that the
+feature is supported only on Android 6.0 (API level 23) and higher versions of
+the platform.
+To ensure that your IME can only be installed on Wearables that support input
+methods beyond voice, add the following to your application's manifest:
+<pre>
+&lt;uses-sdk android:minSdkVersion="23" />
+</pre>
+This indicates that your application requires Android 6.0 or higher.
+For more information, see <a href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a>
+ and the documentation for the <a href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk></a>
+element.
+<p>
+To control how your application is filtered from devices that do not support Wear
+IMEs (for example, on Phone), add the following to your application's manifest:
+</p>
+<pre>
+&lt;uses-feature android:required="true" android:name="android.hardware.type.watch" />
+</pre>
+
+<p>Wear provides user settings on the watch that lets the user to enable multiple
+ IMEs from the list of installed IMEs. Once the users enable your IME, they
+ can invoke your IME from:</p>
+<ul>
+<li>A notification or an app using the
+<a href="http://developer.android.com/reference/android/support/v4/app/RemoteInput.html">RemoteInput</a></code> API.</li>
+<li>Wear apps with an
+<a href="http://developer.android.com/reference/android/widget/EditText.html">EditText</a>
+ field. Touching a text field places the cursor in the field and automatically
+ displays the IME on focus.</li>
+</ul>
+
+
+<h2 id="considerations">General IME Considerations</h2>
+
+<p>Here are some things to consider when implementing IME for wear:</p>
+
+<ul>
+<li><strong>Set Default Action</strong>
+<p>
+<a href="http://developer.android.com/reference/android/support/v4/app/RemoteInput.html">{@code RemoteInput}</a>
+and Wear apps expect only single-line text entry. The ENTER key should always trigger
+ a call to <a href="http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#sendDefaultEditorAction(boolean)">sendDefaultEditorAction</a>,
+ which causes the app to dismiss the keyboard and continue on to the next step
+ or action.</p>
+</li>
+
+<li><Strong>Use full screen mode IME</strong>
+<p>
+Most on-screen input methods will consume most of the screen, leaving very little
+ of the app visible; hence, we discourage Android Wear apps from presenting a
+ visible {@code EditTextView}. Instead, a full-screen IME uses
+ <a href="http://developer.android.com/reference/android/inputmethodservice/ExtractEditText.html">ExtractEditText</a>
+ to render its own view of the attached editor, also providing control over the
+ styling of this view. You can ignore all editor-related events that the IME
+ doesn't generate.
+For more details on full-screen mode, see
+<a href="http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html">InputMethodService</a>.
+</p>
+</li>
+
+<li><strong>Handle inputType flags</strong>
+<p>
+For privacy reasons, at a minimum you should handle the {@code inputType}
+flag {@code TYPE_TEXT_VARIATION_PASSWORD} in your IME. When your IME is in
+password mode, make sure that your keyboard is optimized for single key press
+(auto spelling correction, auto completion and gesture input are disabled).
+Most importantly, keyboard in password mode should support ASCII symbols
+regardless of the input language. For more details, see
+<a href="http://developer.android.com/training/keyboard-input/style.html">Specifying The Input Method Type</a>.
+</p>
+</li>
+
+<li><strong>Provide a key for switching to the next input method</strong>
+<p>
+Android allows users to easily switch between all IMEs supported by the platform.
+ In your IME implementation, set the boolean
+ <a href="http://developer.android.com/guide/topics/text/creating-input-method.html#Switching">supportsSwitchingToNextInputMethod = true</a>
+ to enable your IME to support switching mechanism
+ (so that apps can switch to the next platform-supported IME).
+</p>
+</li>
+</ul>
+
+
+<h2 id="test">Test your IME</h2>
+
+<p>To test your IME, install the
+<a href="https://drive.google.com/a/google.com/file/d/0ByOeMdiY1arvWUk5QXU1V0E3cFU/view?usp=sharing">Input Box</a>
+ app which has a simple <i><code>EditText</i></code> field.
+ When responding to messages from chat apps, you can also use the IME on the
+ watch.</p>
+
+
+