public static interface View.OnDragListener
android.view.View.OnDragListener |
将拖动分派到此视图时调用回调的接口定义。 回调将在托管视图自己的onDrag(event)方法之前被调用。 如果侦听器想要回退到托管视图的onDrag(event)行为,它应该从该回调中返回'false'。
有关实现拖放功能的指南,请阅读 Drag and Drop开发人员指南。
Public methods |
|
---|---|
abstract boolean |
onDrag(View v, DragEvent event) 当拖动事件被分派到视图时调用。 |
boolean onDrag (View v, DragEvent event)
当拖动事件被分派到视图时调用。 这允许监听者有机会覆盖基本的View行为。
Parameters | |
---|---|
v |
View : The View that received the drag event. |
event |
DragEvent : The DragEvent object for the drag event. |
Returns | |
---|---|
boolean |
true if the drag event was handled successfully, or false if the drag event was not handled. Note that false will trigger the View to call its onDragEvent() handler. |