diff options
| author | Vadim Tryshev <vadimt@google.com> | 2016-09-27 18:33:23 -0700 |
|---|---|---|
| committer | Vadim Tryshev <vadimt@google.com> | 2016-09-30 16:47:07 -0700 |
| commit | ad57431f497fc555f8a58a7890073997883bf85f (patch) | |
| tree | 7fe671126b6d2cf028d038d3b54bf41852088588 /core/java/android/view/DragEvent.java | |
| parent | 28fa35ffd6a9ceffbd63410e1178ea2e3de2bb27 (diff) | |
More fixes in drag/drop docs.
Bug: 31702571
Test: Built docs, inspected in Chrome.
Change-Id: Ib7c421a6eacac5e352bbba64eedb9f8b689cbe60
Diffstat (limited to 'core/java/android/view/DragEvent.java')
| -rw-r--r-- | core/java/android/view/DragEvent.java | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/core/java/android/view/DragEvent.java b/core/java/android/view/DragEvent.java index 2baa0b4691ab..16f2d7d0b6c7 100644 --- a/core/java/android/view/DragEvent.java +++ b/core/java/android/view/DragEvent.java @@ -26,7 +26,7 @@ import com.android.internal.view.IDragAndDropPermissions; //TODO: Improve Javadoc /** * Represents an event that is sent out by the system at various times during a drag and drop - * operation. It is a complex data structure that contains several important pieces of data about + * operation. It is a data structure that contains several important pieces of data about * the operation and the underlying data. * <p> * View objects that receive a DragEvent call {@link #getAction()}, which returns @@ -161,8 +161,8 @@ public class DragEvent implements Parcelable { * event when they are added or becoming visible. * </p> * <p> - * A View only receives further drag events if it returns {@code true} in response to - * ACTION_DRAG_STARTED. + * A View only receives further drag events for the drag operation if it returns {@code true} + * in response to ACTION_DRAG_STARTED. * </p> * @see #ACTION_DRAG_ENDED * @see #getX() @@ -172,8 +172,9 @@ public class DragEvent implements Parcelable { /** * Action constant returned by {@link #getAction()}: Sent to a View after - * {@link #ACTION_DRAG_ENTERED} if the drag shadow is still within the View object's bounding - * box. The {@link #getX()} and {@link #getY()} methods supply + * {@link #ACTION_DRAG_ENTERED} while the drag shadow is still within the View object's bounding + * box, but not within a descendant view that can accept the data. The {@link #getX()} and + * {@link #getY()} methods supply * the X and Y position of of the drag point within the View object's bounding box. * <p> * A View receives an {@link #ACTION_DRAG_ENTERED} event before receiving any @@ -355,9 +356,10 @@ public class DragEvent implements Parcelable { /** * Returns the {@link android.content.ClipData} object sent to the system as part of the call * to - * {@link android.view.View#startDrag(ClipData,View.DragShadowBuilder,Object,int) startDrag()}. + * {@link android.view.View#startDragAndDrop(ClipData,View.DragShadowBuilder,Object,int) + * startDragAndDrop()}. * This method only returns valid data if the event action is {@link #ACTION_DROP}. - * @return The ClipData sent to the system by startDrag(). + * @return The ClipData sent to the system by startDragAndDrop(). */ public ClipData getClipData() { return mClipData; @@ -366,12 +368,14 @@ public class DragEvent implements Parcelable { /** * Returns the {@link android.content.ClipDescription} object contained in the * {@link android.content.ClipData} object sent to the system as part of the call to - * {@link android.view.View#startDrag(ClipData,View.DragShadowBuilder,Object,int) startDrag()}. + * {@link android.view.View#startDragAndDrop(ClipData,View.DragShadowBuilder,Object,int) + * startDragAndDrop()}. * The drag handler or listener for a View can use the metadata in this object to decide if the * View can accept the dragged View object's data. * <p> * This method returns valid data for all event actions except for {@link #ACTION_DRAG_ENDED}. - * @return The ClipDescription that was part of the ClipData sent to the system by startDrag(). + * @return The ClipDescription that was part of the ClipData sent to the system by + * startDragAndDrop(). */ public ClipDescription getClipDescription() { return mClipDescription; @@ -384,7 +388,8 @@ public class DragEvent implements Parcelable { /** * Returns the local state object sent to the system as part of the call to - * {@link android.view.View#startDrag(ClipData,View.DragShadowBuilder,Object,int) startDrag()}. + * {@link android.view.View#startDragAndDrop(ClipData,View.DragShadowBuilder,Object,int) + * startDragAndDrop()}. * The object is intended to provide local information about the drag and drop operation. For * example, it can indicate whether the drag and drop operation is a copy or a move. * <p> @@ -394,7 +399,7 @@ public class DragEvent implements Parcelable { * <p> * This method returns valid data for all event actions except for {@link #ACTION_DRAG_ENDED}. * </p> - * @return The local state object sent to the system by startDrag(). + * @return The local state object sent to the system by startDragAndDrop(). */ public Object getLocalState() { return mLocalState; |
