Search code examples
androidintegrationandroid-graphview

How to integrate GraphView into my project?


So I was looking for a graph solution for my app and I stumbled on GraphView.

I was looking around on the github and in the source files and I can't seem to find an integration guide. Maybe it's right in front of my face but I can't see it anywhere.

I have never integrated someone elses code into my own before, so if anyone could give me a quick rundown on how to integrate GraphView with my current project, I would greatly appreciate it.


Solution

  • Option 1:

    1. get the library's jar from here.
    2. copy that jar to the /libs folder in the project where you want to use GraphView.
    3. use it.

    Option 2:

    1. Get the project from github using git:

      • move to your favorite directory using git bash
      • execute from git git clone git://github.com/jjoe64/GraphView.git graphView
      • in Eclipse File-> Import...-> Android -/ Existing Android Code Into Project(use Browse to navigate to the graphView folder from your favorite folder of the previous step)
      • right click the project which will use the GraphView -> Properties -> Android -> at the bottom(the Library area) use Add... to select GraphView
      • use it