Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Smooth leveling on setting level #20

Open
fkucukapps opened this issue Jan 15, 2018 · 2 comments
Open

Smooth leveling on setting level #20

fkucukapps opened this issue Jan 15, 2018 · 2 comments

Comments

@fkucukapps
Copy link

Between setting new levels, the wave level changes immediately. However I want the level to rise and fall gradually. How can I achieve that?

@LutfiTekin
Copy link

LutfiTekin commented Jan 16, 2018

private void updateWaveViewWithAnimation(int start, int end, long duration) {
        ValueAnimator valueAnimator = ValueAnimator.ofInt(start, end);
        valueAnimator.setDuration(duration);
        valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator valueAnimator) {
                waveView.setProgress((int)valueAnimator.getAnimatedValue());
            }
        });
        valueAnimator.start();
    }

I am using this but it is not really smooth on emulator.

@fkucukapps
Copy link
Author

Unfortunately, in my case it diddn't provide me a solution. Thanks for trying anyways, it's a good approach though 👍

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

No branches or pull requests

2 participants