android--Touch Events 你应该记住的一些事
2013-11-22 21:55
429 查看
The
is called whenever a touch event is detected on the surface of a
including on the surface of its children. If
the
intercepted, meaning it will be not be passed on to the child, but rather to the
of the parent.
The
gives a parent the chance to see any touch event before its children do. If you return
the child view that was previously handling touch events receives an
and the events from that point forward are sent to the parent's
for the usual handling.
also return
详情见:点击打开链接
onInterceptTouchEvent()method
is called whenever a touch event is detected on the surface of a
ViewGroup,
including on the surface of its children. If
onInterceptTouchEvent()returns
true,
the
MotionEventis
intercepted, meaning it will be not be passed on to the child, but rather to the
onTouchEvent()method
of the parent.
The
onInterceptTouchEvent()method
gives a parent the chance to see any touch event before its children do. If you return
truefrom
onInterceptTouchEvent(),
the child view that was previously handling touch events receives an
ACTION_CANCEL,
and the events from that point forward are sent to the parent's
onTouchEvent()method
for the usual handling.
onInterceptTouchEvent()can
also return
falseand simply spy on events as they travel down the view hierarchy to their usual targets, which will handle the events with their own
onTouchEvent().
详情见:点击打开链接
相关文章推荐
- android--service 你应该记住的一些事-2
- android--service 你应该记住的一些事-1
- android--Process and Thread 你应该记住的一些事
- android--BitMap 你应该记住的一些事-1
- android--Content Provider 你应该记住的一些事-1
- android--View 你应该记住的一些事
- Android Split touch events 禁用多点触控
- 我们应该时刻记住的一些话--关于职场,关于工作 【写给工作的人,特别是初入职场的人】
- 关于Android屏幕适配应该知道的一些知识
- 最近项目中应该记住的一些经验
- Android Split touch events 禁用多点触控
- 一些应该记住的事情 -- 也希望那些都不是真的
- android 在ViewGroup中处理触摸事件 [Managing Touch Events in a ViewGroup]
- Android ORM——初识greenDAO 3及使用greenDAO 3前应该掌握的一些知识点(一)
- 一些应该记住的东西(持续更新?)
- Android Touch事件传递的一些总结
- 人生应该记住的一些话
- Android 调用系统拍照的一些应该注意的问题
- Android底层启动过程(应该说是应用进程init启动后的一些步骤)
- Android-PullToRefresh的用法 及源码中你应该知道的一些东西