WaveView icon indicating copy to clipboard operation
WaveView copied to clipboard

Problem with save state on the wave view

Open IniterWorker opened this issue 9 years ago • 5 comments

Hello,

I implemented a wave view in fragment with 30 % loaded. I implemented the fragment in the viewpager.

When i switch few pages ("fragments") and I'm back. But the 30 % of the wave_view drew 100 %.

I try to update the view all time and set 30 % the progress. But, this didn't work.

IniterWorker avatar Dec 01 '16 15:12 IniterWorker

I have a same problem!!!

caoyanglee avatar Mar 06 '17 09:03 caoyanglee

This problems have to solve?

WyySZ avatar Mar 24 '17 07:03 WyySZ

Having same issue, anyone solved this?

blackhawk389 avatar Jun 25 '17 00:06 blackhawk389

Hi all, I have same problem and my solution is to add OnGlobalLayoutListener in fragment's onResume method. Then You can set progress on wave view. @Override public void onResume() { super.onResume(); RecyclerView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { WaveView.setProgress(30); RecyclerView.getViewTreeObserver().removeOnGlobalLayoutListener(this); } }); } I hope this will help anyone ;)

StaszewskiIgor avatar Nov 25 '17 13:11 StaszewskiIgor

It works! Thanks :)

ghost avatar Jul 23 '18 15:07 ghost