Abdull,

Take a look at the source for ViewGroup.dispatchTouchEvent.

http://www.netmite.com/android/mydroid/frameworks/base/core/java/android/view/ViewGroup.java

It has code to hit-test children, and it's only a few lines of code.

( provided you can't set click listeners on individual views, which is the usual way to handle this )

-- Kostya

10.01.2011 23:44, Abdull пишет:
I have a ViewGroup (for instance, a RelativeLayout). This ViewGroup is
populated with several Views (for instance, a few Buttons).
Given a Point relative to the ViewGroup's coordinate system, I would
like to look up the View which is located at this Point. That is, I'm
looking for a public method with a signature similar to

class ViewGroup {
...
public View findViewAt(int x, int y)
...
}

Does the Android GUI Framework include such a method? I had a look in
the API documentation but couldn't find something like this. Isn't
this a classic feature GUI APIs usually provide?



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to