Android - Detect Touch Pressure On Capacitive Touch Screen?
I've heard of: MotionEvent e; float press = e.getPressure(...); But this only returns 0 for no touch, and 1 when my finger touches the screen. Is it possible to find a value for t
Solution 1:
MotionEvent().getPressure(i)
should return a value between 0 and 1 based on the "pressure" placed on the screen. In reality for capacitive screens it is the size of the capacitive object rather than literal pressure, but the concept is almost the same for fingers (fingers are squishy). Ranges higher than one may be returned depending on the calibration of the touchscreen.
If your screen is only returning 0 or 1, try testing on another device. Perhaps your screens driver simply does not return those values.
MotionEvent | Android Developers : getPressure()
Post a Comment for "Android - Detect Touch Pressure On Capacitive Touch Screen?"