Wednesday, February 15, 2012

Android Drag & Drop Menu Sample

This project is an example I've built to explore custom View in Android.



The menu class extends View class and override the onDraw method to draw the canvas of the pointer, the menu background and the menu items.
The pointer, and the items are also class.
The onTouchEvent method controls the display touch interaction, setting the X/Y value of each element drawn in the onDraw function.


Code


Notes
  • read risk disclaimer
  • excuse my bad english

2 comments:

  1. I spent a considerable amount of time trying to do this a while ago. Thanks for saving me the headache this time around/

    ReplyDelete