Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb667fd6 authored by Andrew Solovay's avatar Andrew Solovay
Browse files

docs: Updates to Multi-Window/PiP APIs for Preview 2

Per bug b/27528326 , the minimalSize attribute is removed from N
Preview 2, replaced by height and width-specific attributes.

Per bug b/27942263 , several method names have changed for DP2.

DO NOT SUBMIT until the final pre-DP2 push, this change should not
go live before DP2 releases.

See first comment for doc stage location.

bug: 27927931
bug: 27942263
Change-Id: I011ab244218ab123bd28aa9e8cb3bc8858fff815
parent 2f5a2049
Loading
Loading
Loading
Loading
+14 −12
Original line number Original line Diff line number Diff line
@@ -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>