Merge "docs: Updates to Multi-Window/PiP APIs for Preview 2" into mnc-mr-docs am: bd7c1b4

am: 194c1e6

* commit '194c1e6071b6745a0d1f3758a3db35ddb2535000':
  docs: Updates to Multi-Window/PiP APIs for Preview 2

Change-Id: Ib1f42f46449528796d465593853121db8aafd318
This commit is contained in:
Andrew Solovay
2016-04-26 07:53:43 +00:00
committed by android-build-merger

View File

@@ -251,7 +251,7 @@ android:supportsPictureInPicture=["true" | "false"]
</dd> </dd>
<dt> <dt>
<code>android:minimalSize</code> <code>android:minimalHeight</code>, <code>android:minimalWidth</code>
</dt> </dt>
<dd> <dd>
@@ -273,7 +273,8 @@ android:supportsPictureInPicture=["true" | "false"]
&lt;layout android:defaultHeight="500dp" &lt;layout android:defaultHeight="500dp"
android:defaultWidth="600dp" android:defaultWidth="600dp"
android:gravity="top|end" android:gravity="top|end"
android:minimalSize="450dp" /&gt; android:minimalHeight="450dp"
android:minimalWidth="300dp" /&gt;
&lt;/activity&gt; &lt;/activity&gt;
</pre> </pre>
@@ -308,12 +309,13 @@ android:supportsPictureInPicture=["true" | "false"]
<p> <p>
The following new methods have been added to the {@link android.app.Activity} The following new methods have been added to the {@link android.app.Activity}
class to support multi-window display. For details on each method, see the class to support multi-window display. For details on each method, see the
<a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK Reference</a>. <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK
Reference</a>.
</p> </p>
<dl> <dl>
<dt> <dt>
<code>Activity.inMultiWindow()</code> <code>Activity.isInMultiWindowMode()</code>
</dt> </dt>
<dd> <dd>
@@ -321,7 +323,7 @@ android:supportsPictureInPicture=["true" | "false"]
</dd> </dd>
<dt> <dt>
<code>Activity.inPictureInPicture()</code> <code>Activity.isInPictureInPictureMode()</code>
</dt> </dt>
<dd> <dd>
@@ -329,14 +331,14 @@ android:supportsPictureInPicture=["true" | "false"]
<p class="note"> <p class="note">
<strong>Note:</strong> Picture-in-picture mode is a special case of <strong>Note:</strong> Picture-in-picture mode is a special case of
multi-window mode. If <code>myActivity.inPictureInPicture()</code> multi-window mode. If <code>myActivity.isInPictureInPictureMode()</code>
returns true, then <code>myActivity.inMultiWindow()</code> also returns returns true, then <code>myActivity.isInMultiWindowMode()</code> also
true. returns true.
</p> </p>
</dd> </dd>
<dt> <dt>
<code>Activity.onMultiWindowChanged()</code> <code>Activity.onMultiWindowModeChanged()</code>
</dt> </dt>
<dd> <dd>
@@ -347,7 +349,7 @@ android:supportsPictureInPicture=["true" | "false"]
</dd> </dd>
<dt> <dt>
<code>Activity.onPictureInPictureChanged()</code> <code>Activity.onPictureInPictureModeChanged()</code>
</dt> </dt>
<dd> <dd>
@@ -360,14 +362,14 @@ android:supportsPictureInPicture=["true" | "false"]
<p> <p>
There are also {@link android.app.Fragment} versions of each of these There are also {@link android.app.Fragment} versions of each of these
methods, for example <code>Fragment.inMultiWindow()</code>. methods, for example <code>Fragment.isInMultiWindowMode()</code>.
</p> </p>
<h3 id="entering-pip">Entering picture-in-picture mode</h3> <h3 id="entering-pip">Entering picture-in-picture mode</h3>
<p> <p>
To put an activity in picture-in-picture mode, call the new method To put an activity in picture-in-picture mode, call the new method
<code>Activity.enterPictureInPicture()</code>. This method has no effect if <code>Activity.enterPictureInPictureMode()</code>. This method has no effect if
the device does not support picture-in-picture mode. For more information, the device does not support picture-in-picture mode. For more information,
see the <a href="picture-in-picture.html">Picture-in-Picture</a> documentation. see the <a href="picture-in-picture.html">Picture-in-Picture</a> documentation.
</p> </p>