I have written an application where I have a speedometer with a needle, and I am trying to rotate the needle around its center with the speed changes.
I calculate the speed values of download speed from the internet from that that angle also measured,
My Question is how to Fix the Needle one end at the center of speedometer?
How to rotate the needle with change of the angle values?
I am expected like this

here the needle not fix center position How to fix needle center of image like first image
center
Here is a custom GaugeView I wrote:
GaugeView.java
And the
gauge_layout.xmllayout xml file:Implementation example:
UPDATE:
AbsoluteLayoutis deprecated. You can replace it withRelativeLayoutand some code changes.