Android-Speedometer icon indicating copy to clipboard operation
Android-Speedometer copied to clipboard

Speedometer Gauge Resizing

Open codewithjams opened this issue 7 years ago • 1 comments

@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?

codewithjams avatar Jan 30 '18 04:01 codewithjams

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.

bilthon avatar Jan 30 '18 05:01 bilthon