Skip to content

This is a Custom Graph View made for the OC Android Developers Meetup. The idea is to show how to make custom views in Android.

License

Notifications You must be signed in to change notification settings

abdullah-web-dev/GraphViewDemo

 
 

Repository files navigation

Graph View Demo

GraphViewDemo

This app shows the evolution of writing a custom view by creating a graph view that takes in an array of floats and draws either a line or bar graph. The graph view also accepts touch inputs and draws a pointer with animations.

Each GraphView builds off of the previous one.

Steps:

  1. GraphView - overrides onDraw to draw two lines to make the axes of the graph
  2. GraphView2 - adds public setData method and uses a Path object to draw the line graph
  3. GraphView3 - overrides onTouchEvent and draws a pointer for where the user is touching
  4. GraphView4 - adds animation with ValueAnimator to animate the pointer when a user touches the graph
  5. GraphView5 - adds custom attributes to control the graph view in xml and adds a bar type graph that can be selected with custom attribute

Created for a talk given at the OC Android Developer Meetup group.

Slides for this talk can be found here.

About

This is a Custom Graph View made for the OC Android Developers Meetup. The idea is to show how to make custom views in Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%