Grav
Grav copied to clipboard
Animation Would Not Restart Properly After "stop" Method Call
Hello,
In the "GravSampleFragment" fragment class of the sample app, I noticed the "onPause" life-cycle method is overridden with an extra call to:
gravView.stop();
I tried to let the animation restart by adding the following code in the "GravSampleFragment" fragment class:
@Override
public void onResume() {
super.onResume();
if (!running) {
running = true;
gravView.start();
}
}
and changed the existing two methods to the following:
private boolean running;
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
running = true;
}
@Override
public void onPause() {
super.onPause();
gravView.stop();
running = false;
}
But unfortunately the animation would not restart (or continue from the stopped state) despite the fact that gravView.start() is called. Could you please point out whether it is possible to restart the animation once stopped? Thank you!
I got the same issue. Tried to call initializeRefreshAnimator
of GravView
before start()
to reinitialize animator, but it doesn't help
I am seeing the same issue only on older devices (4.X).