Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedometer Gauge Resizing #5

Open
codewithjams opened this issue Jan 30, 2018 · 1 comment
Open

Speedometer Gauge Resizing #5

codewithjams opened this issue Jan 30, 2018 · 1 comment

Comments

@codewithjams
Copy link

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

@bilthon
Copy link
Owner

bilthon commented Jan 30, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants