From 45bdeb4ef8eed682d2ea9a72b2e56d6dd47ea449 Mon Sep 17 00:00:00 2001
From: Andrew Solovay
+ Users can drag and
+ drop data from one activity to another while the activities are sharing
+ the screen. (Previously, users could only drag and drop data within a single
+ activity.)
+
@@ -285,8 +291,7 @@ android:supportsPictureInPicture=["true" | "false"]
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
-
- N Preview SDK Reference.
+ N Preview SDK Reference
- Note: Picture-in-Picture mode is a special case of
+ Note: Picture-in-picture mode is a special case of
multi-window mode. If
To put an activity in picture-in-picture mode, call the new method
Multi-Window Lifecycle
@@ -306,7 +311,7 @@ android:supportsPictureInPicture=["true" | "false"]
Call to find out if the activity is in picture-in-picture mode.
myActivity.inPictureInPicture()
returns true, then myActivity.inMultiWindow() also returns
true.
@@ -341,14 +346,13 @@ android:supportsPictureInPicture=["true" | "false"]
methods, for example Fragment.inMultiWindow().
Entering Picture-in-Picture Mode
+Entering picture-in-picture mode
Activity.enterPictureInPicture(). This method has no effect if
the device does not support picture-in-picture mode. For more information,
- see
- Picture-in-Picture Mode.
+ see the Picture-in-Picture documentation.
Launch New Activities in Multi-Window Mode
@@ -386,6 +390,70 @@ android:supportsPictureInPicture=["true" | "false"]
window in multi-window mode, you must launch it in a new task stack.
+ Users can drag and + drop data from one activity to another while the two activities are + sharing the screen. (Previously, users could only drag and drop data within a + single activity.) For this reason, you may want to add drag and drop + functionality to your app if your app does not currently support it. +
+ +
+ The N Preview SDK extends the android.view
+ package to support cross-app drag and drop. For details on the following
+ classes and methods, see the N
+ Preview SDK Reference.
+
android.view.DropPermissions
+ View.startDragAndDrop()
+ View.cancelDragAndDrop()
+ View.updateDragShadow()
+ Activity.requestDropPermissions()
+