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

Problem with save state on the wave view #17

Open
IniterWorker opened this issue Dec 1, 2016 · 5 comments
Open

Problem with save state on the wave view #17

IniterWorker opened this issue Dec 1, 2016 · 5 comments

Comments

@IniterWorker
Copy link

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 IniterWorker changed the title Problem with save state one the wave view Problem with save state on the wave view Dec 1, 2016
@caoyanglee
Copy link

I have a same problem!!!

@WyySZ
Copy link

WyySZ commented Mar 24, 2017

This problems have to solve?

@blackhawk389
Copy link

Having same issue, anyone solved this?

@StaszewskiIgor
Copy link

StaszewskiIgor commented Nov 25, 2017

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 ;)

@ghost
Copy link

ghost commented Jul 23, 2018

It works! Thanks :)

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

5 participants