我需要触发ACTION_DRAG_ENDED事件。然而,根据文档,只有在使用true(表示可以接受对象)响应ACTION_DRAG_STARTED时,才会触发此事件。问题在于ACTION_DRAG_STARTED未触发! 因此,我认为问题的关键在于我没有得到ACTION_DRAG_STARTED。下面是我认为所有相关拖放代码(或至少几乎所有): private OnTouchListener onTouchListener = ...
DragEvent dragEvent){intaction = dragEvent.getAction();// Whether the dragged object can be handled by the trash.booleanresult = dragListener.onDrag(view, dragEvent);if(action == DragEvent.ACTION_DRAG_ENDED) {
The drag/click-pending state ends when the criteria for dragging has been satisfied, or when a MouseUp has been received before dragging could begin (in which case the user has clicked), or when a Complete or Cancel event has been received....
protected virtual void OnDragPendingEnded( MouseActionEventArgs e ) Parameterse Type: Microsoft.VisualStudio.Modeling.Diagrams.MouseActionEventArgs The arguments for a mouse action.RemarksThe drag/click-pending state ends when the criteria for dragging has been satisfied, or when a MouseUp has been ...
protected virtual void OnDragPendingEnded( MouseActionEventArgs e ) 參數 e 類型:Microsoft.VisualStudio.Modeling.Diagrams.MouseActionEventArgs 滑鼠動作的引數。 備註 這個拖曳或按一下暫止狀態結束,當拖曳的標準內容後,或者,當 MouseUp 接收時,在拖曳開始 (在使用者按一下) 情況下前,或者,在完成或取消事件...
protected virtual void OnDragPendingEnded( MouseActionEventArgs e ) 参数e 类型:Microsoft.VisualStudio.Modeling.Diagrams.MouseActionEventArgs 鼠标事件的参数。备注该拖/单击挂起状态的,在拖动的标准满足时,或者,在 MouseUp 将前时接收可能开始 (在用户单击了) 情况下,或者,在完成或取消收到事件。....