user3034559
user3034559

Reputation: 1329

How can I get control based on absolute coordinates in android system?

I know the absolute coordinates after user touches screen on activity in Android system. How can I find control based on absolute coordinates in android system?

Thanks in advance.

Upvotes: 0

Views: 59

Answers (1)

Robert Estivill
Robert Estivill

Reputation: 12497

The following two methods of the class android.view.View will give you the absolute coordinates in pixels

http://developer.android.com/reference/android/view/View.html#getX()

http://developer.android.com/reference/android/view/View.html#getY()

Upvotes: 1

Related Questions