Android-Speedometer
Android-Speedometer copied to clipboard
Speedometer Gauge Resizing
@bilthon In the XML Preview, when I set the XML Attribute of Speedometer View as android:layout_width
and android:layout_height
to wrap_content
, it shows that the view is inflating in a squared manner (means the width and height of view are same, which is evident in the code on Speedometer.java
's onMeasure ()
method.
And, I guess the Speedometer Gauge is adjusting on the basis of Width and Height assigned.
If I want to increase the Size of Gauge, how can it be done?
It's been a while since I've touched that code, but did you check that the chooseDimension()
method calls the getPreferredSize()
here at line 153? this is returning a hard-coded value of 300. So I guess that if you change that you'll adjust the size of the view.