Android Speedometer (Needle Gauge)
Asked Answered
G

4

8

Creating a simple app that calculates the speed your going and displays it in a speedometer graphic. I can do all the speed calculations, gps calculations etc.. but i am not too sure about the animation. Does anyone have any good tutorials or examples on needle gauges other than the thermometer example out there?

Glick answered 16/9, 2011 at 21:2 Comment(0)
Q
2

You could probably start with something like this.

Then when transitioning between values, do an animation where the needle gradually moves to the next value X units per unit of time.

This question is also very similar to yours.

Quetzal answered 16/9, 2011 at 21:6 Comment(0)
P
6

I know, the post is quite old. But I had the same situation: there is no a good control for representing speed. I guess many people are facing this.

I've implemented SpeedometerView myself: a simple speedometer with needle and colored value ranges. Feel free to download!

https://github.com/ntoskrnl/SpeedometerView

enter image description here

This control was used in my app CardioMood.

The code is not optimized, but works. Enjoy!

Perplexed answered 28/2, 2014 at 9:44 Comment(0)
M
4

Check here. It is my code. If you have any question please let me know. Visit https://github.com/mucahitsidimi/GaugeView

You can implement Gauge to your project simply.

<com.sidimi.mucahit.gaugeview.GaugeView
android:id="@+id/gaugeView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>

You can set width and height what ever you want to. It will calculate everything automatically.

image

Mccreery answered 29/9, 2015 at 11:43 Comment(0)
J
3

Check the solution i found for my case.

Big thanks to the owner Evelina Vrabie...

enter image description here

Jagir answered 19/10, 2013 at 11:5 Comment(0)
Q
2

You could probably start with something like this.

Then when transitioning between values, do an animation where the needle gradually moves to the next value X units per unit of time.

This question is also very similar to yours.

Quetzal answered 16/9, 2011 at 21:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.