summaryrefslogtreecommitdiff
path: root/core/java/android/view/DragEvent.java
diff options
context:
space:
mode:
authorVladislav Kaznacheev <kaznacheev@google.com>2016-05-16 12:57:15 -0700
committerVladislav Kaznacheev <kaznacheev@google.com>2016-05-16 12:57:15 -0700
commitc2449702201ac0588f823719d23f7f6d39f6ad97 (patch)
tree56f661bd04ab05e830c3f2638e7fab69195bd767 /core/java/android/view/DragEvent.java
parent00749aeb15d52151fcc9f9051b525840c49e14ce (diff)
Fix inconsistencies in DragEvent.getX/getY behavior and JavaDoc.
Make getX/getY return view-relative position as specified in the class JavaDoc. Fix obvious errors in JavaDoc for getX/getY Bug: 28793547 Change-Id: Ic2ac646189711e7466594d4fc8326408fc0348e1
Diffstat (limited to 'core/java/android/view/DragEvent.java')
-rw-r--r--core/java/android/view/DragEvent.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/view/DragEvent.java b/core/java/android/view/DragEvent.java
index 0dfbe7060039..fb482b4e33ff 100644
--- a/core/java/android/view/DragEvent.java
+++ b/core/java/android/view/DragEvent.java
@@ -160,6 +160,8 @@ public class DragEvent implements Parcelable {
* ACTION_DRAG_STARTED.
* </p>
* @see #ACTION_DRAG_ENDED
+ * @see #getX()
+ * @see #getY()
*/
public static final int ACTION_DRAG_STARTED = 1;
@@ -323,17 +325,16 @@ public class DragEvent implements Parcelable {
/**
* Gets the X coordinate of the drag point. The value is only valid if the event action is
- * {@link #ACTION_DRAG_LOCATION} or {@link #ACTION_DROP}.
- * @return The current drag point's Y coordinate
+ * {@link #ACTION_DRAG_STARTED}, {@link #ACTION_DRAG_LOCATION} or {@link #ACTION_DROP}.
+ * @return The current drag point's X coordinate
*/
public float getX() {
return mX;
}
/**
- * Gets the Y coordinate of the drag point. The value is valid if the
- * event action is {@link #ACTION_DRAG_ENTERED}, {@link #ACTION_DRAG_LOCATION},
- * {@link #ACTION_DROP}, or {@link #ACTION_DRAG_EXITED}.
+ * Gets the Y coordinate of the drag point. The value is only valid if the event action is
+ * {@link #ACTION_DRAG_STARTED}, {@link #ACTION_DRAG_LOCATION} or {@link #ACTION_DROP}.
* @return The current drag point's Y coordinate
*/
public float getY() {