I recently had to adapt quite a pile of code for android. To get to know to the classes and their dependencies and life cycles I started drawing UML class and sequence diagrams (inspired by the book
Head First OOA&D). Eclipse has some really nice shortcuts to navigate in code (
Cmd+Space
to jump to the declaration, and
Ctrl+Alt+h
to show references) but nevertheless it's hard to keep a bird's eye on the code.
This is one my first class diagrams for using the camera:
I pretty sure that I got some symbols (arrowheads) wrong, but I the idea was to simply get an overview.
The code for this
CameraPreviewTest
class can be found at
https://github.com/michaelhaberler/MIY.
After a couple of diagrams I wanted to store and edit the diagrams for documentation purposes. So I looked around for some UML editors which allowed me to create and update my diagrams quickly:
- http://www.draw.io
Updated class diagram:
Sequence diagram to visualize a route of calls and callbacks to setup the android camera and some additional view classes:
- http://www.umlet.com/
- AmaterasUML
AmaterasUML was arguably the quickest to create very detailed UML class diagrams. It's an eclipse plugin and I just had to drag the classes from the package explorer into the editor window.