Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

Commit

Permalink
Auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
google-automerger committed May 17, 2017
1 parent 5e94525 commit aa3712f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .google/packaging.yaml
Expand Up @@ -4,9 +4,9 @@
# This file is used by Google as part of our samples packaging process.
# End users may safely ignore this file. It has no relevance to other systems.
---
status: DRAFT
status: PUBLISHED
technologies: [Android]
categories: [Android N Preview]
categories: [UI]
languages: [Java]
solutions: [Mobile]
github: android-DragAndDropAcrossApps-new
Expand Down
24 changes: 12 additions & 12 deletions README.md
Expand Up @@ -14,15 +14,15 @@ Introduction
------------

Android N introduces support for drag and drop between applications,
augmenting the existing APIs that have enabled this within a single
augmenting the existing APIs that have enabled this within a single
window before.

To start a drag operation you need to call `View.startDragAndDrop`.
To start a drag operation you need to call `View.startDragAndDrop`.
Which gesture or action triggers this is up to you as an app developer.
The API guide recommends doing this from
The API guide recommends doing this from
`View.OnLongClickListener.onLongClick` and this seems to be the de-facto
standard, but you are free to use other gestures (single tap, tap and drag
etc).
standard, but you are free to use other gestures (single tap, tap and drag
etc).
However, if you go for a unconventional drag start gesture, note that
the framework implementation assumes that the pointer (touch or mouse)
is down while the drag is starting, and the most recent touch/click
Expand All @@ -34,24 +34,24 @@ than a long click).

By default a drag and drop operation is constrained by the window
containing the view that started the drag.
To enable cross-window and cross-app drag and drop add
To enable cross-window and cross-app drag and drop add
`View.DRAG_FLAG_GLOBAL` to the flags passed to the `View.startDragAndDrop`
call.
call.

If a Uri requiring permission grants is being sent, then the
`android.view.View.DRAG_FLAG_GLOBAL_URI_READ` and/or the
If a Uri requiring permission grants is being sent, then the
`android.view.View.DRAG_FLAG_GLOBAL_URI_READ` and/or the
`android.view.View.DRAG_FLAG_GLOBAL_URI_WRITE` flags must be used also.
To access content URIs requiring permissions on the receiving side, the target
app needs to request the `android.view.DropPermissions` from the activity via
`android.app.Activity.requestDropPermissions`. This permission will stay either
`android.app.Activity.requestDropPermissions`. This permission will stay either
until the activity is alive, or until the `release()` method is called on the
`android.view.DropPermissions` object.

Pre-requisites
--------------

- Android SDK 25
- Android Build Tools v25.0.2
- Android Build Tools v25.0.3
- Android Support Repository

Screenshots
Expand Down Expand Up @@ -80,7 +80,7 @@ submitting a pull request through GitHub. Please see CONTRIBUTING.md for more de
License
-------

Copyright 2016 The Android Open Source Project, Inc.
Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

0 comments on commit aa3712f

Please sign in to comment.