Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的自定义视图中,我覆盖
public boolean onInterceptTouchEvent(MotionEvent ev);
false在某个动作事件中返回,
false
但我想问另一个视图来处理它,我怎样才能将它转发MotionEvent给另一个视图?
MotionEvent
谢谢你。
从 onInterceptTouch 事件返回 false 将触摸事件传递给 aViewGroup的子级,返回 true 将其保留为ViewGroup自身。请参阅文档,他们对此的解释非常详细。
ViewGroup