开发者

Android MotionEvent equivalent to Java MouseEvent?

开发者 https://www.devze.com 2023-03-21 22:13 出处:网络
I\'m wondering if MotionEvent in Android is equivalent to MouseEvent in Java? All I\'m attempting to do is get the x and y coordinates an开发者_Python百科d check if they are inside my View. (I notice

I'm wondering if MotionEvent in Android is equivalent to MouseEvent in Java?

All I'm attempting to do is get the x and y coordinates an开发者_Python百科d check if they are inside my View. (I noticed that MotionEvent has getters for both x and y)


All I'm attempting to do is get the x and y coordinates and check if they are inside my View.

MotionEvent is the correct way to go for this purpose.

I'm wondering if MotionEvent in Android is equivalent to MouseEvent in Java?

They're almost identical, although MotionEvent is for touch, but I think you've already figured that out.

0

精彩评论

暂无评论...
验证码 换一张
取 消