Reputation: 11829
Is there an example about how to measure the strength of pressing the screen? I know there is a command, i just cant find it.
Upvotes: 3
Views: 567
Reputation: 344
The method is android.view.MotionEvent.getPressure().
You can also fetch the size of the touch with MotionEvent.getSize(). Beware though, most models have different screens and will behave differently.
EDIT: It also doesn't seem to work with WebView.
Upvotes: 3