Drag and drop functionality on Android devices
Recently I've been working on developing eLearning to be hosted on an Android device and during the process have developed a number of interactions including a drag and drop. During the testing process everything worked as designed through a standard browser (e.g. Chrome) however when loading it onto my Android device for testing the drag and drop didn't work.
I searched through various discussions to try and find an answer but without fail so I persevered and came to some very interesting conclusions:
- Drag and drop doesn't work on my Android device if I use an image to drag
The original idea was for the user to drag an icon from one part of the screen and drop it onto a shape to reveal a new layer.
- Use a shape, such as a rectangle as your draggable item
Rather than use an image I created a couple of rectangles. The rectangles were solid fill and, when testing I was able to drag the item around the screen. I then used an image fill as a background to the shape. I was no longer able to drag the item at all so I reverted to a solid fill. When I dropped it onto the drop zone the action was not registered.
- Use a shape with a solid fill for the drop zone
My original drop zone was a rectangle with a patterned fill. Although I could drag the rectangles onto the drop zone it wasn't showing the new layer. I changed the drop zone shape from a pattern fill to a solid fill, retested and it worked first time and every time since.
I use Articulate Storyline 2 and have been testing on a Samsung Galaxy S5 mini smartphone.
I'm not sure what to conclude from this testing other than the fact that I found a work around for drag and drop on my Android device and as such I have a very effective mobile interaction. I hope this helps others in the community find a solution also.