I want to make an app which shows cardio graph in real time. That means i want to measure heart bit and want to show the bit rate in graph in my application. But i wondering to draw the cardio graph. I have gone through many sample graph codes but dint get any clue to draw cardio graph. Is there any clue from any body?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Mercurial Commit Charts / Graphs [closed]
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
For this specific application, you may want to draw the graph "by hand" using Path and a SurfaceView.
Get a Paint instance ready during initialization:
When you need to update the graphic, clear the scene and build the line path (adapt this to your needs) :
You may also use quadTo or cubicTo instead of lineTo.
If you want your graph to have a realtime animation effect (i.e. sliding to the left while data is coming on the right), you may draw on a SurfaceView in a similar way to the famous LunarLander example (following code is a simplified version):
Where mSurfaceHolder is obtained by calling
yourSurfaceView.getHolder()
anddoDraw
is where you callcanvas.drawPath()
and all your drawing code.