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

Commit 47c41e80 authored by Erik's avatar Erik
Browse files

Added methods for getting the x and y span

We would like to separate x and y for our pinch gestures. This
change adds methods for returning those independently instead of
only allowing access to the total span.

Change-Id: I2f54cd83602e447174a49035237da379a573b63e
parent 18931f57
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -192817,6 +192817,28 @@
 visibility="public"
>
</method>
<method name="getCurrentSpanX"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getCurrentSpanY"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getEventTime"
 return="long"
 abstract="false"
@@ -192861,6 +192883,28 @@
 visibility="public"
>
</method>
<method name="getPreviousSpanX"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getPreviousSpanY"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getScaleFactor"
 return="float"
 abstract="false"
+64 −24
Original line number Diff line number Diff line
@@ -427,6 +427,26 @@ public class ScaleGestureDetector {
        return mCurrLen;
    }

    /**
     * Return the current x distance between the two pointers forming the
     * gesture in progress.
     *
     * @return Distance between pointers in pixels.
     */
    public float getCurrentSpanX() {
        return mCurrFingerDiffX;
    }

    /**
     * Return the current y distance between the two pointers forming the
     * gesture in progress.
     *
     * @return Distance between pointers in pixels.
     */
    public float getCurrentSpanY() {
        return mCurrFingerDiffY;
    }

    /**
     * Return the previous distance between the two pointers forming the
     * gesture in progress.
@@ -442,6 +462,26 @@ public class ScaleGestureDetector {
        return mPrevLen;
    }

    /**
     * Return the previous x distance between the two pointers forming the
     * gesture in progress.
     *
     * @return Previous distance between pointers in pixels.
     */
    public float getPreviousSpanX() {
        return mPrevFingerDiffX;
    }

    /**
     * Return the previous y distance between the two pointers forming the
     * gesture in progress.
     *
     * @return Previous distance between pointers in pixels.
     */
    public float getPreviousSpanY() {
        return mPrevFingerDiffY;
    }

    /**
     * Return the scaling factor from the previous scale event to the current
     * event. This value is defined as