tags:

views:

41

answers:

2

Hi! i have to create a dynamic graph in android .... picture is given below..

alt text

Please guide me.....

+1  A: 

What you need is a Canvas element. Check the documentation, is not very complicated to use.

Android Canvas Documentation

Depending how you want your data to be refreshed to can take different approaches but what I recommend you is having a canvas element that is refreshed when a new value is ready to display and then call the proper method to refresh it.

Cheers!

biquillo
+1  A: 

I'd recommend a custom view. There may be a Java library out there that does what you want, but chances are it's either too bulky or is closed source.

With a custom view, you get a canvas, and you get to draw anything you like on it. You can create methods to update the data.

You then define your custom view in your XML using the fully qualified package name and class name. So if your package is com.foo your custom view class is called MyView then you would define it in your layout as <com.foo.MyView>

Brad Hein