WaveLoading
WaveLoading copied to clipboard
Setting amplitude removes wave
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);
I have test your code on my device(Xiaomi 5, Andorid 7.0), it works fine. Does the demo work properly on your device?
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);`
why we do not have a
mAnimator.start();
inside the setLevel() function ?