How are we supposed to ensure that drag targets in hidden views, or
views that exist at a zindex further back than the current views dont
get fired?

Problem:

I build a data grid with draggable grid headers (for column
reordering)... and it works fantastic everywhere that I've tried until
I've flipped to another tab with another grid and then back. I went
ahead and hobbled some stuff together so that the clipdescription has
a label of grid_+getId(), to try and filter out items being dropped
from other grids onto this one... and it seems to work as my logging
in my DragEvent.ACTION_DRAG_EXITED event for only the grid headers on
that particular grid.

(pseudo code in ACTION_DRAG_STARTED ->
if(event.getClipDescription().getLabel().toString().equals(whatever)
do stuff and return true, otherwise return false) According to the
documentation, this should in theory prevent further events from
firing relative to this drag event and this listener.

The curious thing though, is that the logging of the entire operation
looks like this...
Started dragging column: FirstName
Started dragging column: LastName
Started dragging column: Age
//bad description, as those are the columns that are responding, not
necessarily columns that are being dragged.

Dragged out of: Description
Reporting dropResult: false
//description is a column that exists in another grid in another
tabview

Dragging stopped column: FirstName
Dragging stopped column: LastName
Dragging stopped column: Age

//finally the ended event


Additional note... this seems to only be a problem with the datagrid
on the very first tab view, not the other 2 pages in this particular
case.

So my questions are...
1) first of all is there a better way to segregate drop targets to
ensure content  that is technically the write type, isnt dropped
places it simply doesnt make sense? In this case, I dont want to test
that the content type is correct, but rather the target group or
parent control id are the same.

2) Am I correct in the assumption that 3 draggable items, I should
have 3 simultaneous event chains firing off, and ultimately context is
whats key? (eg, button2 is being dragged, button 1 starts and responds
to being dragged over... and likewise behind the scenes we should see
drag event for button2 saying started, and then a dragevent for
button1 firing off ACTION_DRAG_ENTERED?

3) I thought I understood the drag and drop as a single datagrid
worked beautifully with dragging columns around, however as soon as
there are other items that probably happen to match the same x/y
though different z indexes, the functionality breaks.


I can try and build a proof of concept to display this erroneous
behavior, but wanted to filter out the possibility that I am making a
dumb little mistake, before taking time for the POC.

Regards,

Weston Weems

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to