onTouchEvent in Fragments

4,766 views
Skip to first unread message

Resh

unread,
Oct 19, 2011, 8:40:19 AM10/19/11
to android-platform
Hi,

I have an FragmentActivity which containns 4 fragments in
FragmentPagerAdapter.

Now,I need to use onTouchEvent( ) in Fragment.

Any help appreciated.

Thank You

Dianne Hackborn

unread,
Oct 20, 2011, 1:00:58 AM10/20/11
to android-...@googlegroups.com
Fragments don't do onTouchEvent, this is done by the view hierarchy.  So your fragment generates its view hierarchy in onCreateView(), and you implement that view hierarchy to handle touch events as desired.


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




--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Reply all
Reply to author
Forward
0 new messages