Issue
I'm testing the new Navigation Component and I have some "problems" about how it work in some cases.
I make this app https://github.com/LipeDuoli/navPlayground to test
I created the login activity (with will have several fragments) has no toolbar or bottom navigation. When I finish the login I want to go to main Activity (has toolbar and bottom navigation).
How I can remove the login activity from the back stack, to not return to login when press back? I tried to select the popTo option on navigator editor but had no success
From the main activity I want to show a detail from an item. When I execute the action to navigate to the next fragment, how I can hide the bottom navigation only on this detail fragment?
thx
Solution
You could make MainActivity your opening activity. Then start the LoginActivity from
startActivityForResult(intentObj)
setup some condition to check if the device is already logged in MainActivity and if it doesn't accept the condition start the LoginActivity.
Another way would be to call finish() in login activity
Answered By - jeevan s
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.