Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic tutorial: display a diagram file in Android application (Read 14706 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 668
Joined: Apr 6th, 2003
tutorial: display a diagram file in Android application
Apr 16th, 2013 at 12:30pm
Print Post  
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:


4. Add the diagram xml files you want to display to the projectís assets folder:


5. Open res/layout/activity_main.xml and replace the default TextView with a com.mindfusion.diagramming.DiagramView instance:


6. Edit MainActivity.java and call DiagramView.getDiagram().loadFromXml() from the Activity.onCreate override:


7. Start the application using Android Emulator:


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!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint