Thanks very much for this, you have helped immensely in identifying key components like Clipdata to keep a reference of the image being dragged. I had a lot of trouble with drag and drop operations and could not understand how to keep track of the image being dragged. For example, in “setOnLongClickListener” lambda, I did not understand how to return “it” (or the View! innerscope value) outside the wrapped function. I tried setting an outerscope variable, and then assigning “it” to the variable, but it would of course remain the same.
That was one aspect I was having difficulty with, and the tutorial helped a lot. It also helped me understand DragEvents, and how to implement the whole shabang properly. I hope you can post more tutorials for us noobs!