I'm working on what requires custom drag and drop functions, so I subclassed the View by doing a bunch of math in response to touch events, and then manually outputting everything using the canvas code in onDraw. Now, the more functionality I add, the more code gets out of hand, and I find that I write more tons of code than I would expect in a high-level environment like Android.
Is this so, or am I missing something? If I am not doing anything unusual in the user interface, the structure handles most of my interactions. Built-in controls handle strokes and drag and drop, and my code is pretty much limited to business logic and data. Is there a way to take advantage of some of the user interface controls and things like animation, and also make some of them manually on the onDraw canvas? Is there an accepted standard for when to use one or the other (if indeed the two approaches can be mixed)?
java android user-interface drag-and-drop
Rich
source share