carlosmuvi / SegmentedProgressBar

Instagram like segmented progress bar for Android, written in Kotlin!
132 stars 24 forks source link

App crashes when starting the progressbar #7

Closed ClaudeHangui closed 4 years ago

ClaudeHangui commented 7 years ago

Hi, I am using your library to show a progress bar upon drawing a route using google maps api... There is a play/pause button to start drawing/tracing the route.. When I click on my play button I have this error:

java.lang.ArithmeticException: divide by zero at com.carlosmuvi.segmentedprogressbar.SegmentedProgressBar$initDrawingTimer$1.onTick(SegmentedProgressBar.kt:49)

The stacktrace doesn't show any line in my code so I don't really know what I am missing here.... Thx

Dq commented 6 years ago

@ClaudeHangui did you find the cause for this issue? I had a similar issue, and in my case I was passing a total duration of the segment below 1 second (10 ms actually), and it crashed with the same error you mentioned.

carlosmuvi commented 4 years ago

This is actually a bug. Working on a fix now.