Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double view restore in Basic Sample? #209

Closed
rjrjr opened this issue Sep 2, 2016 · 2 comments
Closed

Double view restore in Basic Sample? #209

rjrjr opened this issue Sep 2, 2016 · 2 comments

Comments

@rjrjr
Copy link
Collaborator

rjrjr commented Sep 2, 2016

Haven't yet diagnosed if this is a bug in Flow or the sample app, but here's the recipe.

  • Launch Basic Sample
  • Give your name, hit return
  • On the Hello screen, click the increment button a few times
  • Without hitting the device back button, swap to another app and then back to the sample.

Notice that the increment has been reset to zero, and that it's being double-painted on the screen over / under the old value.

screen shot 2016-09-02 at 9 53 45 am

@rjrjr
Copy link
Collaborator Author

rjrjr commented Sep 2, 2016

This block in the dispatcher is skipped on pause / resume, so we never remove the current child before putting in the new one. Unclear to me if this is a bug in the sample app or in KeyDispatcher. Seems like something should have short-circuited but didn't.

    if (traversal.origin != null) {
      if (frame.getChildCount() > 0) {
        traversal.getState(traversal.origin.top()).save(frame.getChildAt(0));
        frame.removeAllViews();
      }
    }

@rjrjr
Copy link
Collaborator Author

rjrjr commented Sep 2, 2016

Oh, derp—KeyDispatcher isn't used here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant