StartingGroovy
StartingGroovy

Reputation: 2860

Android MotionEvent equivalent to Java MouseEvent?

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 and check if they are inside my View. (I noticed that MotionEvent has getters for both x and y)

Upvotes: 1

Views: 890

Answers (1)

Wroclai
Wroclai

Reputation: 26925

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.

Upvotes: 2

Related Questions