-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Description
Hello, what is the best way to update the series positions manually? I have to update them very regularly but the bars series stop very quickly to move forward (Screen seems blocked). Should not we stop one event before starting another? Here is the code that creates the events, this method is called every second between 50 and 100 times.
`override fun updateGetCount(progress: Int, total: Int, percent: Float) {
Timber.i("SyncService: $progress : $percent %")
mPercent = percent.toInt()
if (total != 0) {
when {
percent <= 15 -> {
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries1Index).setDuration(1).build())
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries2Index).setDuration(1).build())
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries3Index).setDuration(1).build())
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries4Index).setDuration(1).build())
}
percent <= 25 -> {
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries2Index).setDuration(1).build())
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries3Index).setDuration(1).build())
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries4Index).setDuration(1).build())
}
percent <= 70 -> {
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries3Index).setDuration(1).build())
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries4Index).setDuration(1).build())
}
else -> {
mArcView.addEvent(DecoEvent.Builder(percent).setIndex(mSeries4Index).setDuration(1).build())
}
}
}
}`
Metadata
Metadata
Assignees
Labels
No labels