Android Button Press Strength

Is there an example of how to measure the strength of a screen tap? I know that there is a team, I just can’t find it.

+3
source share
1 answer

Method isroid.view.MotionEvent.getPressure ().

You can also select the size of the touch using MotionEvent.getSize (). Beware, however, most models have different screens and will behave differently.

EDIT: It also does not work with WebView.

+3
source

Source: https://habr.com/ru/post/1786163/


All Articles