获取pressure与一个按钮获得pressed按钮、pressure、pressed

2023-09-04 06:33:09 作者:Sunny.晴天

有没有在Android的一个简单的方法来获取用户onClick事件期间延长了pressure?

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

推荐答案

如果您添加MotionEvent监听到你的按钮,你可以要求从MotionEvent pressure。

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

相关文档:

http://developer.android.com/reference/android/查看/ View.OnTouchListener.html

的http://developer.android.com/reference/android/view/MotionEvent.html#get$p$pssure()