Home | History | Annotate | Download | only in ui
      1 page.title=
      2 page.metaDescription=Android N 
      3 page.keywords="multi-window", "android N", "split screen", "free-form"
      4 
      5 @jd:body
      6 
      7 <div id="tb-wrapper">
      8   <div id="tb">
      9     <h2></h2>
     10       <ol>
     11         <li><a href="#overview"></a></li>
     12         <li><a href="#lifecycle"></a></li>
     13         <li><a href="#configuring">
     14 </a></li>
     15         <li><a href="#running"></a></li>
     16         <li><a href="#testing"></a></li>
     17       </ol>
     18     <h2></h2>
     19       <ol>
     20         <li><a class="external-link" href="https://github.com/googlesamples/android-MultiWindowPlayground"> Playground 
     21 </a></li>
     22         <li><a class="external-link" href="https://medium.com/google-developers/5-tips-for-preparing-for-multi-window-in-android-n-7bed803dda64"> Android N </a></li>
     23       </ol>
     24   </div>
     25 </div>
     26 
     27 <p>
     28   Android N 
     29 
     30 <em></em>
     31 
     32 <em></em>
     33 </p>
     34 
     35 <p>
     36    N Preview SDK 
     37  Activity 
     38 
     39 
     40 
     41 </p>
     42 
     43 <h2 id="overview"></h2>
     44 
     45 <p>
     46   Android N 
     47 
     48 
     49 
     50 </p>
     51 
     52 <ul>
     53   <li> Android N 
     54 
     55 
     56 
     57   </li>
     58 
     59   <li> Android N  Nexus Player <a href="picture-in-picture.html"></a>
     60 
     61 
     62 
     63   </li>
     64 
     65   <li> Activity 
     66 
     67 
     68 
     69   </li>
     70 </ul>
     71 
     72 <img src="{@docRoot}images/android-7.0/mw-splitscreen.png" alt="" width="650" srcset="{@docRoot}images/android-7.0/mw-splitscreen.png 1x,
     73     {@docRoot}images/android-7.0/mw-splitscreen_2x.png 2x," id="img-split-screen" />
     74 <p class="img-caption">
     75   <strong> 1.</strong> 
     76 </p>
     77 
     78 <p>
     79   
     80 </p>
     81 
     82 <ul>
     83   <li> <a href="{@docRoot}guide/components/recents.html">Overview </a> Activity  Activity  Activity 
     84 
     85 
     86 
     87   </li>
     88 
     89   <li> Overview  Activity  Overview  Activity
     90 
     91 
     92   </li>
     93 </ul>
     94 
     95 <p>
     96    Activity  Activity <a href="{@docRoot}guide/topics/ui/drag-drop.html"></a>
     97 
     98  Activity 
     99 
    100 </p>
    101 
    102 <h2 id="lifecycle"></h2>
    103 
    104 <p>
    105    <a href="{@docRoot}training/basics/activity-lifecycle/index.html">Activity </a>
    106 
    107 </p>
    108 
    109 <p>
    110    Activity 
    111  Activity  Activity<em></em>
    112    Activity 
    113    Activity  Activity 
    114  Activity  Activity  Activity 
    115 
    116 
    117 </p>
    118 
    119 <p class="note">
    120   <strong></strong>
    121 
    122 
    123  Activity  {@link android.app.Activity#onPause onPause()} 
    124 
    125 <em></em>
    126    {@link android.app.Activity#onStop
    127   onStop()}  {@link android.app.Activity#onStart
    128   onStart()} 
    129 </p>
    130 
    131 <p>
    132   <a href="{@docRoot}guide/topics/resources/runtime-changes.html"></a> Activity 
    133 
    134 
    135 
    136    Activity 
    137 
    138 
    139 <a href="{@docRoot}guide/topics/resources/runtime-changes.html"></a> Activity  Activity Activity
    140 
    141 
    142 
    143 </p>
    144 
    145 <p>
    146    Activity <a href="{@docRoot}guide/topics/resources/runtime-changes.html"></a>
    147 
    148  {@link
    149   android.R.attr#windowBackground windowBackground}  <code>windowBackgroundFallback</code> 
    150 
    151 
    152 </p>
    153 
    154 <h2 id="configuring"></h2>
    155 
    156 <p>
    157    Android N Activity 
    158 
    159 
    160    Activity  Activity
    161  Activity  <code>android:resizeableActivity</code>  true Activity 
    162 
    163 
    164 </p>
    165 
    166 <p class="note">
    167   <strong></strong> Android N  SDK 
    168 
    169 
    170 
    171 
    172 
    173 <em></em>
    174 </p>
    175 
    176 <h4 id="resizeableActivity">android:resizeableActivity</h4>
    177 <p>
    178    <code>&lt;activity&gt;</code> 
    179  <code>&lt;application&gt;</code> 
    180 
    181 </p>
    182 
    183 <pre>
    184 android:resizeableActivity=["true" | "false"]
    185 </pre>
    186 
    187 <p>
    188    trueActivity 
    189  falseActivity 
    190  false Activity Activity 
    191 
    192 
    193 </p>
    194 
    195 <p>
    196    Android N true
    197 
    198 </p>
    199 
    200 <h4 id="supportsPictureInPicture">android:supportsPictureInPicture</h4>
    201 
    202 <p>
    203    <code>&lt;activity&gt;</code>  Activity 
    204  <code>android:resizeableActivity</code>  false
    205 
    206 </p>
    207 
    208 <pre>
    209 android:supportsPictureInPicture=["true" | "false"]
    210 </pre>
    211 
    212 <h3 id="layout"></h3>
    213 
    214 <p>
    215    Android N<code>&lt;layout&gt;</code>  Activity 
    216 
    217 
    218 </p>
    219 
    220 <dl>
    221   <dt>
    222     <code>android:defaultWidth</code>
    223   </dt>
    224 
    225   <dd>
    226      Activity 
    227   </dd>
    228 
    229   <dt>
    230     <code>android:defaultHeight</code>
    231   </dt>
    232 
    233   <dd>
    234      Activity 
    235   </dd>
    236 
    237   <dt>
    238     <code>android:gravity</code>
    239   </dt>
    240 
    241   <dd>
    242      Activity  {@link android.view.Gravity} 
    243 
    244   </dd>
    245 
    246   <dt>
    247     <code>android:minimalHeight</code><code>android:minimalWidth</code>
    248   </dt>
    249 
    250   <dd>
    251      Activity 
    252  Activity  Activity 
    253 
    254 
    255   </dd>
    256 </dl>
    257 
    258 <p>
    259    Activity  Activity 
    260 
    261 
    262 </p>
    263 
    264 <pre>
    265 &lt;activity android:name=".MyActivity"&gt;
    266     &lt;layout android:defaultHeight="500dp"
    267           android:defaultWidth="600dp"
    268           android:gravity="top|end"
    269           android:minimalHeight="450dp"
    270           android:minimalWidth="300dp" /&gt;
    271 &lt;/activity&gt;
    272 </pre>
    273 
    274 <h2 id="running"></h2>
    275 
    276 <p>
    277   Android N 
    278 
    279 </p>
    280 
    281 <h3 id="disabled-features"></h3>
    282 
    283 <p>
    284    Activity  Activity 
    285 
    286 
    287 
    288 <ul>
    289   <li><a href="{@docRoot}training/system-ui/index.html"> UI</a> 
    290 
    291 
    292   </li>
    293 
    294   <li> <code><a href=
    295   "{@docRoot}guide/topics/manifest/activity-element.html#screen"
    296   >android:screenOrientation</a></code> 
    297   </li>
    298 </ul>
    299 
    300 <h3 id="change-notification"></h3>
    301 
    302 <p>
    303   {@link android.app.Activity} 
    304  <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK </a>
    305 
    306 
    307 </p>
    308 
    309 <dl>
    310   <dt>
    311     <code>Activity.isInMultiWindowMode()</code>
    312   </dt>
    313 
    314   <dd>
    315      Activity 
    316   </dd>
    317 
    318   <dt>
    319     <code>Activity.isInPictureInPictureMode()</code>
    320   </dt>
    321 
    322   <dd>
    323      Activity 
    324 
    325     <p class="note">
    326       <strong></strong>
    327  <code>myActivity.isInPictureInPictureMode()</code>  true <code>myActivity.isInMultiWindowMode()</code>  true
    328 
    329 
    330     </p>
    331   </dd>
    332 
    333   <dt>
    334     <code>Activity.onMultiWindowModeChanged()</code>
    335   </dt>
    336 
    337   <dd>
    338     Activity 
    339  Activity  true  false 
    340 
    341 
    342   </dd>
    343 
    344   <dt>
    345     <code>Activity.onPictureInPictureModeChanged()</code>
    346   </dt>
    347 
    348   <dd>
    349     Activity 
    350  Activity  true  false 
    351 
    352 
    353   </dd>
    354 </dl>
    355 
    356 <p>
    357    {@link android.app.Fragment}  <code>Fragment.isInMultiWindowMode()</code>
    358 
    359 </p>
    360 
    361 <h3 id="entering-pip"></h3>
    362 
    363 <p>
    364    Activity <code>Activity.enterPictureInPictureMode()</code>
    365 
    366 <a href="picture-in-picture.html"></a>
    367 
    368 </p>
    369 
    370 <h3 id="launch"> Activity</h3>
    371 
    372 <p>
    373    Activity  Activity  Activity 
    374  <code>Intent.FLAG_ACTIVITY_LAUNCH_TO_ADJACENT</code>
    375 
    376 
    377 
    378 </p>
    379 
    380 <ul>
    381   <li> Activity  Activity Activity 
    382 
    383  Activity 
    384 
    385   </li>
    386 
    387   <li>
    388   </li>
    389 </ul>
    390 
    391 <p>
    392    Activity  <code>ActivityOptions.setLaunchBounds()</code>  Activity 
    393 
    394 
    395 
    396 </p>
    397 
    398 <p class="note">
    399   <strong></strong> Activity Activity  Activity
    400 
    401  Activity Activity
    402 
    403 </p>
    404 
    405 <h3 id="dnd"></h3>
    406 
    407 <p>
    408    Activity  Activity <a href="{@docRoot}guide/topics/ui/drag-drop.html"></a>
    409 
    410  Activity 
    411 
    412 
    413 </p>
    414 
    415 <p>
    416   N Preview SDK  <a href="{@docRoot}reference/android/view/package-summary.html"><code>android.view</code></a> 
    417  <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK </a>
    418 
    419 
    420 </p>
    421 
    422 <dl>
    423   <dt>
    424     <code>android.view.DropPermissions</code>
    425   </dt>
    426 
    427   <dd>
    428     
    429 
    430   </dd>
    431 
    432   <dt>
    433     <code>View.startDragAndDrop()</code>
    434   </dt>
    435 
    436   <dd>
    437     {@link android.view.View#startDrag View.startDrag()}  Activity  <code>View.DRAG_FLAG_GLOBAL</code>
    438 
    439  Activity  URI  <code>View.DRAG_FLAG_GLOBAL_URI_READ</code>  <code>View.DRAG_FLAG_GLOBAL_URI_WRITE</code>
    440 
    441 
    442 
    443   </dd>
    444 
    445   <dt>
    446     <code>View.cancelDragAndDrop()</code>
    447   </dt>
    448 
    449   <dd>
    450     
    451 
    452   </dd>
    453 
    454   <dt>
    455     <code>View.updateDragShadow()</code>
    456   </dt>
    457 
    458   <dd>
    459     
    460 
    461   </dd>
    462 
    463   <dt>
    464     <code>Activity.requestDropPermissions()</code>
    465   </dt>
    466 
    467   <dd>
    468      {@link android.view.DragEvent}  {@link
    469     android.content.ClipData}  URI 
    470   </dd>
    471 </dl>
    472 
    473 <h2 id="testing"></h2>
    474 
    475 <p>
    476    Android N  Android N 
    477 
    478 
    479 </p>
    480 
    481 <h3 id="configuring"></h3>
    482 
    483 <p>
    484    Android N
    485 
    486 </p>
    487 
    488 <h3 id="test-non-n"> N Preview SDK </h3>
    489 
    490 <p>
    491    N Preview SDK 
    492 
    493 
    494 </p>
    495 
    496 <p>
    497    Android N 
    498 
    499 
    500 
    501 </p>
    502 
    503 <p>
    504   
    505 
    506 
    507 </p>
    508 
    509 <h3 id="test-mw"></h3>
    510 
    511 <p>
    512    N Preview SDK 
    513 
    514 
    515 </p>
    516 
    517 <ul>
    518   <li> Overview 
    519 
    520   </li>
    521 
    522   <li>
    523  Overview 
    524 
    525 
    526   </li>
    527 
    528   <li>
    529    UI 
    530 
    531   </li>
    532 
    533   <li>
    534 
    535 
    536   </li>
    537 
    538   <li> UI 
    539 
    540 
    541   </li>
    542 </ul>
    543 
    544 <h4 id="test-checklist"></h4>
    545 
    546 <p>
    547   
    548 
    549 
    550 </p>
    551 
    552 <ul>
    553   <li>
    554   </li>
    555 
    556   <li>
    557 
    558 
    559 
    560   </li>
    561 
    562   <li>
    563 
    564 
    565 
    566 
    567   </li>
    568 
    569   <li>
    570 <a href="{@docRoot}tools/debugging/debugging-memory.html"></a>
    571 
    572 
    573   </li>
    574 
    575   <li>
    576  UI 
    577 
    578   </li>
    579 </ul>
    580 
    581 <h3 id="test-disabled-mw"></h3>
    582 
    583 <p>
    584    <code>android:resizableActivity="false"</code>  Android N 
    585 
    586 
    587 
    588 
    589 </p>
    590