Skip to content Skip to sidebar Skip to footer

Getting The Pressure With Which A Button Gets Pressed

Is there an easy way in android to get the pressure that the user extended during an onClick event?

Solution 1:

If you add an MotionEvent listener to your button you can ask for pressure from the MotionEvent.

Relevant docs:

http://developer.android.com/reference/android/view/View.OnTouchListener.html

http://developer.android.com/reference/android/view/MotionEvent.html#getPressure()

Post a Comment for "Getting The Pressure With Which A Button Gets Pressed"