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

Bug refreshing UI #45

Open
severinewillez opened this issue Jun 28, 2018 · 0 comments
Open

Bug refreshing UI #45

severinewillez opened this issue Jun 28, 2018 · 0 comments

Comments

@severinewillez
Copy link

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())
            }
        }
    }
}`
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

1 participant