Merge "docs: Updates to Multi-Window/PiP APIs for Preview 2" into mnc-mr-docs
This commit is contained in:
committed by
Android (Google) Code Review
commit
bd7c1b4df7
@@ -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"]
|
|||||||
<layout android:defaultHeight="500dp"
|
<layout android:defaultHeight="500dp"
|
||||||
android:defaultWidth="600dp"
|
android:defaultWidth="600dp"
|
||||||
android:gravity="top|end"
|
android:gravity="top|end"
|
||||||
android:minimalSize="450dp" />
|
android:minimalHeight="450dp"
|
||||||
|
android:minimalWidth="300dp" />
|
||||||
</activity>
|
</activity>
|
||||||
</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user