-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
PointerSpeedometer tick labels overlap the speedometer bar and its default tickPadding isn't correct #214
Comments
You can play with ticks' position with The overlap issue appear only on this type of speedometers. Because it has a responsive speedometer bar that change its color depending on current speed, unlike other speedometers which have a static bar drown only once. So, in this speedometer I think I will have to redraw the ticks over the speedometer bar on each frame. Hope it will not affect the performance though. Your ticks and marks aren't matching because you have not matching number of ticks and marks. To make them so, you need to set mark number lower than tick number by 2 (Because ticks have min & max positions over marks). In your case you have 8 marks and 10 ticks, so you need either to increase ticks |
I was able to fix the position and the ticks following your suggestions. |
Fixed in version |
Describe the bug
Labels of ticks with PointerSpeedometer are drawn below the speed indication. They should be put by default more on the inside to not overlap with the speed indication. It seems also that labels are not set corresponding to tick positions.
It would be nice to have the option to let them be drawn on top of the speed indication as well and have the possibility to choose where to put the text.
XML & code
<com.github.anastr.speedviewlib.PointerSpeedometer
android:id="@+id/speedView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:sv_unit = " Mbps"
app:sv_withTremble="false"
app:sv_tickNumber="9"
app:sv_speedometerColor="#80ff0000"/>
Screenshots
The text was updated successfully, but these errors were encountered: