获取pressure与一个按钮获得pressed [英] Getting the pressure with which a button gets pressed

查看:119
本文介绍了获取pressure与一个按钮获得pressed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有在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()

这篇关于获取pressure与一个按钮获得pressed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆