Hey all,

Here's what I'm having trouble with. In my activity, i have a layout.
That layout has a bunch of custom views scattered about.

This activity also has an OnTouchListener attached to it. And in the
on touch method, i'd like to know which of the views was touched. So i
thought, that there is a "View" object that is passed into the onTouch
method.

But I cannot cast that view object and findViewById(v.getId()) doesn't
work either. How can I cast the View object (argument of onTouch) into
the view of my custom class.

public boolean onTouch(View v, MotionEvent e){
     MyCustomView a = (MyCustomView)v ///??????
}

Thanks,
Asim

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

Reply via email to