Advertisement

Pro Android 4 pp 813-832 | Cite as

Implementing Drag and Drop

  • Satya Komatineni
  • Dave MacLean

Abstract

In the last chapter, we covered touchscreens, the MotionEvent class, and gestures. You learned how to use touch to make things happen in your application. One area that we didn’t cover was drag and drop. On the surface, drag and drop seems like it should be fairly simple: touch an object on the screen, drag it across the screen (usually over some other object), and let go, and the application should take the appropriate action. In many computer operating systems, this is a common way to delete a file from the desktop; you just drag the file’s icon to the trash-bin icon, and the file gets deleted. In Android, you may have seen how to rearrange icons on the home screen by dragging them to new locations or to the trash.

Keywords

Text Message Drag Event Custom View View Reference Computer Operating System 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Satya Komatineni and Dave MacLean 2012

Authors and Affiliations

  • Satya Komatineni
  • Dave MacLean

There are no affiliations available

Personalised recommendations