我想知道 Android 中的 MotionEvent
是否等同于 Java 中的 MouseEvent
?
我试图做的就是获取 x
和 y
坐标并检查它们是否在我的 View 中。 (我注意到 MotionEvent
有 x 和 y 的 setter/getter )
最佳答案
All I'm attempting to do is get the x and y coordinates and check if they are inside my View.
MotionEvent
是实现此目的的正确方法。
I'm wondering if
MotionEvent
in Android is equivalent toMouseEvent
in Java?
它们几乎相同,尽管 MotionEvent
用于触摸,但我想您已经明白了。
关于java - Android MotionEvent 等同于 Java MouseEvent?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6782578/