Hi All, Click event in vewgroup child not firing if i use dispatchTouchEvent(MotionEvent e) for touch. if i use onInterceptTouchEvent(MotionEvent e) i can stop the touch event and click is working as we expect. but i need click for viewgroup child items also i need to touch to drag the viewgroup.
Thanks in advance On Wednesday, November 7, 2012 1:25:01 PM UTC+5:30, Mobile Developer wrote: > > Hi Bob > > Thanks for your reply. I need to use both touch and click events. if i > return false from dispatchTouchEvent then i cant able to use touch events. > I dont know how to add click events for viewgroup childs. > > > Thanks > > > On Wed, Nov 7, 2012 at 1:03 AM, bob <[email protected]> wrote: > >> Why don't you return false in dispatchTouchEvent? >> >> >> On Tuesday, November 6, 2012 6:37:47 AM UTC-6, Mobile Developer wrote: >>> >>> Hi All, >>> >>> I have viewgroup that extends LinearLayout but i cant able to add >>> onclick events to the child elements. Its only accessing ontouch event. >>> >>> I used dispatchTouchEvent(MotionEvent e) to touch event and i returned >>> true. >>> >>> I tried onInterceptTouchEvent(**MotionEvent ev) to stop touch event. >>> eventhough i cant able to add onclick event. >>> >>> >>> How to add click event on ViewGroup child elements. can we able add >>> onclick and ontouch event for viewgroup? >>> >>> >>> Thanks in advance >>> >> [email protected] > > -- 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

