1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2013 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17
18<sample>
19    <name>MultiWindowPlayground</name>
20    <group>UI</group>
21    <package>com.example.android.multiwindowplayground</package>
22
23    <minSdk>24</minSdk>
24    <compileSdkVersion>24</compileSdkVersion>
25    <targetSdkVersion>24</targetSdkVersion>
26
27    <strings>
28        <intro>
29            <![CDATA[
30This sample demonstrates the use of the multi-window API available
31in Android N. It shows the use of new Intent flags and
32AndroidManifest properties to define the multi-window behavior.
33Switch the sample app into multi-window mode to see how it affects
34the lifecycle and behavior of the app.
35            ]]>
36        </intro>
37    </strings>
38
39    <template src="base-build" />
40
41    <metadata>
42        <status>PUBLISHED</status>
43        <categories>UI</categories>
44        <technologies>Android</technologies>
45        <languages>Java</languages>
46        <solutions>Mobile</solutions>
47        <level>INTERMEDIATE</level>
48        <!-- Dimensions: 512x512, PNG fomrat -->
49        <icon>screenshots/icon-web.png</icon>
50        <!-- Path to screenshots. Use <img> tags for each. -->
51        <screenshots>
52            <img>screenshots/main.png</img>
53        </screenshots>
54        <api_refs>
55            <android>android.content.Intent</android>
56            <android>android.app.ActivityOptions</android>
57        </api_refs>
58        <description>
59<![CDATA[
60This sample demonstrates the use of the multi-window API available
61in Android N. It shows the use of new Intent flags and
62AndroidManifest properties to define the multi-window behavior.
63Switch the sample app into multi-window mode to see how it affects
64the lifecycle and behavior of the app.
65]]>
66        </description>
67
68        <intro>
69<![CDATA[
70Android N introduces new APIs to support multiple activities
71to be displayed at the same time.
72
73Activities that are started within the same task stack
74inherit their multiwindow properties from the activity that fired
75off the intent. The following features are available when an activity
76has been launched into a new task stack.
77
78An activity can be set as not resizable through the
79`android:resizableActivity` property in the AndroidManifest. All
80applications targeting Android N or above are resizable by default.
81
82In split-screen mode, an activity can be started adjacent to the
83launching activity by setting the
84`Intent.FLAG_ACTIVITY_LAUNCH_TO_ADJACENT` flag in its intent.
85
86Sometimes activities may choose to handle configuration changes
87themselves (for example for games or OpenGL-based applications). In this
88case, setting
89`android:configChanges=screenSize|smallestScreenSize|screenLayout|orientation`
90in the AndroidManifest definition of the activity enables callbacks for
91all configuration changes that may occur during multi-window use for the
92Activity. See [Handling Runtime Changes][1].
93
94In freeform mode (where applications can be freely resized), activities
95can be started within a certain area of the screen using the
96`ActivityOptions#setLaunchBounds` call.
97
98Alternatively, the preferred and minimum sizes can be set in a new
99`layout` property in the AndroidManifest.
100
101
102[1]: https://developer.android.com/guide/topics/resources/runtime-changes.html
103]]>
104        </intro>
105    </metadata>
106</sample>
107