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

flow.replaceTo(new Screen()) --> flow.set(new Screen()) ? #83

Closed
seligijus opened this issue Apr 28, 2015 · 2 comments
Closed

flow.replaceTo(new Screen()) --> flow.set(new Screen()) ? #83

seligijus opened this issue Apr 28, 2015 · 2 comments

Comments

@seligijus
Copy link

Good day,
How can I use flow.set() to get same effect as flow.replaceTo() ?

@mozarcik
Copy link

I've done this:

Backstack b = Backstack.single(new MainPath());
Flow.get(getContext()).setBackstack(b, Flow.Direction.REPLACE);

I have LoginPath and after successful login it is replaced with MainPath so when user press back key it will close application instead going back to LoginPath

@seligijus
Copy link
Author

Thanks, that worked well, but backstack name was changed to history:
History history = History.single(new Screen());
flow.setHistory(history, Flow.Direction.REPLACE);

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

2 participants