Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8ee4049 authored by joneckenrode's avatar joneckenrode
Browse files

Revised the API documentation for overloaded methods getRawX, getRawY, getX,...


Revised the API documentation for overloaded methods getRawX, getRawY, getX, and getY of MotionEvent.

Bug: 172573621
Test: Built API documentation
Signed-off-by: default avatarjoneckenrode <joneckenrode@google.com>
Change-Id: I87006493a3876da1338694120c92ec3f0ea6c3cf
parent d47a35e3
Loading
Loading
Loading
Loading
+114 −42
Original line number Original line Diff line number Diff line
@@ -2263,8 +2263,11 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * {@link #getX(int)} for the first pointer index (may be an
     * Equivalent to {@link #getX(int)} for pointer index 0 (regardless of the
     * arbitrary pointer identifier).
     * pointer identifier).
     *
     * @return The X coordinate of the first pointer index in the coordinate
     *      space of the view that received this motion event.
     *
     *
     * @see #AXIS_X
     * @see #AXIS_X
     */
     */
@@ -2273,8 +2276,11 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * {@link #getY(int)} for the first pointer index (may be an
     * Equivalent to {@link #getY(int)} for pointer index 0 (regardless of the
     * arbitrary pointer identifier).
     * pointer identifier).
     *
     * @return The Y coordinate of the first pointer index in the coordinate
     *      space of the view that received this motion event.
     *
     *
     * @see #AXIS_Y
     * @see #AXIS_Y
     */
     */
@@ -2416,13 +2422,20 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * Returns the X coordinate of this event for the given pointer
     * Returns the X coordinate of the pointer referenced by
     * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
     * {@code pointerIndex} for this motion event. The coordinate is in the
     * identifier for this index).
     * coordinate space of the view that received this motion event.
     * Whole numbers are pixels; the
     *
     * value may have a fraction for input devices that are sub-pixel precise.
     * <p>Use {@link #getPointerId(int)} to get the pointer identifier for the
     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
     * pointer referenced by {@code pointerIndex}.
     * (the first pointer that is down) to {@link #getPointerCount()}-1.
     *
     * @param pointerIndex Index of the pointer for which the X coordinate is
     *      returned. May be a value in the range of 0 (the first pointer that
     *      is down) to {@link #getPointerCount()} - 1.
     * @return The X coordinate of the pointer referenced by
     *      {@code pointerIndex} for this motion event. The unit is pixels. The
     *      value may contain a fractional portion for devices that are subpixel
     *      precise.
     *
     *
     * @see #AXIS_X
     * @see #AXIS_X
     */
     */
@@ -2431,13 +2444,20 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * Returns the Y coordinate of this event for the given pointer
     * Returns the Y coordinate of the pointer referenced by
     * <em>index</em> (use {@link #getPointerId(int)} to find the pointer
     * {@code pointerIndex} for this motion event. The coordinate is in the
     * identifier for this index).
     * coordinate space of the view that received this motion event.
     * Whole numbers are pixels; the
     *
     * value may have a fraction for input devices that are sub-pixel precise.
     * <p>Use {@link #getPointerId(int)} to get the pointer identifier for the
     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
     * pointer referenced by {@code pointerIndex}.
     * (the first pointer that is down) to {@link #getPointerCount()}-1.
     *
     * @param pointerIndex Index of the pointer for which the Y coordinate is
     *      returned. May be a value in the range of 0 (the first pointer that
     *      is down) to {@link #getPointerCount()} - 1.
     * @return The Y coordinate of the pointer referenced by
     *      {@code pointerIndex} for this motion event. The unit is pixels. The
     *      value may contain a fractional portion for devices that are subpixel
     *      precise.
     *
     *
     * @see #AXIS_Y
     * @see #AXIS_Y
     */
     */
@@ -2683,12 +2703,13 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * Returns the original raw X coordinate of this event.  For touch
     * Equivalent to {@link #getRawX(int)} for pointer index 0 (regardless of
     * events on the screen, this is the original location of the event
     * the pointer identifier).
     * on the screen, before it had been adjusted for the containing window
     * and views.
     *
     *
     * @see #getX(int)
     * @return The X coordinate of the first pointer index in the coordinate
     *      space of the device display.
     *
     * @see #getX()
     * @see #AXIS_X
     * @see #AXIS_X
     */
     */
    public final float getRawX() {
    public final float getRawX() {
@@ -2696,12 +2717,13 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * Returns the original raw Y coordinate of this event.  For touch
     * Equivalent to {@link #getRawY(int)} for pointer index 0 (regardless of
     * events on the screen, this is the original location of the event
     * the pointer identifier).
     * on the screen, before it had been adjusted for the containing window
     * and views.
     *
     *
     * @see #getY(int)
     * @return The Y coordinate of the first pointer index in the coordinate
     *      space of the device display.
     *
     * @see #getY()
     * @see #AXIS_Y
     * @see #AXIS_Y
     */
     */
    public final float getRawY() {
    public final float getRawY() {
@@ -2709,13 +2731,38 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * Returns the original raw X coordinate of this event.  For touch
     * Returns the X coordinate of the pointer referenced by
     * events on the screen, this is the original location of the event
     * {@code pointerIndex} for this motion event. The coordinate is in the
     * on the screen, before it had been adjusted for the containing window
     * coordinate space of the device display, irrespective of system
     * and views.
     * decorations and whether or not the system is in multi-window mode. If the
     *
     * app spans multiple screens in a multiple-screen environment, the
     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
     * coordinate space includes all of the spanned screens.
     * (the first pointer that is down) to {@link #getPointerCount()}-1.
     *
     * <p>In multi-window mode, the coordinate space extends beyond the bounds
     * of the app window to encompass the entire display area. For example, if
     * the motion event occurs in the right-hand window of split-screen mode in
     * landscape orientation, the left edge of the screen&mdash;not the left
     * edge of the window&mdash;is the origin from which the X coordinate is
     * calculated.
     *
     * <p>In multiple-screen scenarios, the coordinate space can span screens.
     * For example, if the app is spanning both screens of a dual-screen device,
     * and the motion event occurs on the right-hand screen, the X coordinate is
     * calculated from the left edge of the left-hand screen to the point of the
     * motion event on the right-hand screen. When the app is restricted to a
     * single screen in a multiple-screen environment, the coordinate space
     * includes only the screen on which the app is running.
     *
     * <p>Use {@link #getPointerId(int)} to get the pointer identifier for the
     * pointer referenced by {@code pointerIndex}.
     *
     * @param pointerIndex Index of the pointer for which the X coordinate is
     *      returned. May be a value in the range of 0 (the first pointer that
     *      is down) to {@link #getPointerCount()} - 1.
     * @return The X coordinate of the pointer referenced by
     *      {@code pointerIndex} for this motion event. The unit is pixels. The
     *      value may contain a fractional portion for devices that are subpixel
     *      precise.
     *
     *
     * @see #getX(int)
     * @see #getX(int)
     * @see #AXIS_X
     * @see #AXIS_X
@@ -2725,13 +2772,38 @@ public final class MotionEvent extends InputEvent implements Parcelable {
    }
    }


    /**
    /**
     * Returns the original raw Y coordinate of this event.  For touch
     * Returns the Y coordinate of the pointer referenced by
     * events on the screen, this is the original location of the event
     * {@code pointerIndex} for this motion event. The coordinate is in the
     * on the screen, before it had been adjusted for the containing window
     * coordinate space of the device display, irrespective of system
     * and views.
     * decorations and whether or not the system is in multi-window mode. If the
     *
     * app spans multiple screens in a multiple-screen environment, the
     * @param pointerIndex Raw index of pointer to retrieve.  Value may be from 0
     * coordinate space includes all of the spanned screens.
     * (the first pointer that is down) to {@link #getPointerCount()}-1.
     *
     * <p>In multi-window mode, the coordinate space extends beyond the bounds
     * of the app window to encompass the entire device screen. For example, if
     * the motion event occurs in the lower window of split-screen mode in
     * portrait orientation, the top edge of the screen&mdash;not the top edge
     * of the window&mdash;is the origin from which the Y coordinate is
     * determined.
     *
     * <p>In multiple-screen scenarios, the coordinate space can span screens.
     * For example, if the app is spanning both screens of a dual-screen device
     * that's rotated 90 degrees, and the motion event occurs on the lower
     * screen, the Y coordinate is calculated from the top edge of the upper
     * screen to the point of the motion event on the lower screen. When the app
     * is restricted to a single screen in a multiple-screen environment, the
     * coordinate space includes only the screen on which the app is running.
     *
     * <p>Use {@link #getPointerId(int)} to get the pointer identifier for the
     * pointer referenced by {@code pointerIndex}.
     *
     * @param pointerIndex Index of the pointer for which the Y coordinate is
     *      returned. May be a value in the range of 0 (the first pointer that
     *      is down) to {@link #getPointerCount()} - 1.
     * @return The Y coordinate of the pointer referenced by
     *      {@code pointerIndex} for this motion event. The unit is pixels. The
     *      value may contain a fractional portion for devices that are subpixel
     *      precise.
     *
     *
     * @see #getY(int)
     * @see #getY(int)
     * @see #AXIS_Y
     * @see #AXIS_Y