This tutorial assumes you have Eclipse and the Android SDK installed.
1. Extract the content of
https://www.mindfusion.eu/DiagAndroid.zip.
2. Create a new Android project in Eclipse by running the Android Application Project wizard from File -> New -> Project…, using the BlankActivity template and default names for activity files.
3. Add RoboDiagram.jar to the project’s
libs folder:
![android1.png android1.png](http://mindfusion.eu/images/android/android1.png)
4. Add the diagram xml files you want to display to the project’s assets folder:
![android2.png android2.png](http://mindfusion.eu/images/android/android2.png)
5. Open res/layout/activity_main.xml and replace the default TextView with a com.mindfusion.diagramming.DiagramView instance:
![android3.png android3.png](http://mindfusion.eu/images/android/android3.png)
6. Edit MainActivity.java and call DiagramView.getDiagram().loadFromXml() from the Activity.onCreate override:
![android4.png android4.png](http://mindfusion.eu/images/android/android4.png)
7. Start the application using Android Emulator:
![android5.png android5.png](http://mindfusion.eu/images/android/android5.png)
The viewer API includes most model classes and their members from the MindFusion Java diagramming library, documented at
http://www.mindfusion.eu/onlinehelp/jdiagram/. With their help you can enumerate objects of the loaded diagram, and detect touches over them by calling methods such as getNodeAt in response to touch events.
Enjoy!