Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题是我会从应用程序 android 中的屏幕获取签名。我希望签名由连续的点组成,其中我想要坐标 x 和 y、屏幕上的压力和点之间的时间间隔。对于坐标,android中有一个类,但我没有找到如何计算其他两个参数。你知道android中的一些类吗?
该MotionEvent课程是您需要的课程。这个类的一个对象在类的onTouchEvent函数中提供给你View。只需重载此函数即可为您的应用实现您想要的行为。
MotionEvent
onTouchEvent
View