WaveLoading icon indicating copy to clipboard operation
WaveLoading copied to clipboard

Setting amplitude removes wave

Open tylergets opened this issue 8 years ago • 3 comments

Hey, I am trying to use this library however whenever I set the amplitude to anything, the wave animation no longer works. It becomes a straight line.

This is android 7.0 on an LG G5.

I am setting the amplitude as so

 mWaveDrawable = new WaveDrawable(this, R.drawable.bar_filler);
        mWaveDrawable.setIndeterminate(true);
        mWaveDrawable.setWaveAmplitude(32);
        binding.imageView3.setImageDrawable(mWaveDrawable);

tylergets avatar Feb 13 '17 18:02 tylergets

I have test your code on my device(Xiaomi 5, Andorid 7.0), it works fine. Does the demo work properly on your device?

race604 avatar Feb 14 '17 11:02 race604

i am in a fragment and the waves desapear when i set it (android 6.0+)

   `ImageView imageView = v.findViewById(R.id.battery);`
    `Drawable mWaveDrawable = new WaveDrawable(imageView.getDrawable());`
    `//((WaveDrawable) mWaveDrawable).setIndeterminate(true);`
    `mWaveDrawable.setLevel(35);`
    `((WaveDrawable) mWaveDrawable).setWaveAmplitude(40);`
    `((WaveDrawable) mWaveDrawable).setWaveLength(150);`
    `((WaveDrawable) mWaveDrawable).setWaveSpeed(5);`
    `imageView.setImageDrawable(mWaveDrawable);`

moolight-seashell avatar Apr 16 '19 09:04 moolight-seashell

why we do not have a mAnimator.start(); inside the setLevel() function ?

moolight-seashell avatar Apr 16 '19 09:04 moolight-seashell