I am creating an android app that needs a user login page. Should I make the login activity as my main activity or create another activity for the login screen? What is the correct work flow and what are the cons and pros of having login activity as my main activity?
Asked
Active
Viewed 978 times
2
-
2NO. The *main* activity is the activity which is used most. Or the one which is to be considered the *base* activity. You want to *start* with a login activity. And only *start* with that one, not to return to that one when you are done with other activities. So simply set it as your LAUNCHER activity. – Phantômaxx Mar 07 '19 at 14:35
2 Answers
0
I would recommend using a single activity with fragments - for example, the Navigation Architecture Component is a great tool that gives you just this.
What I like the most in this API is that :
1) Its really a very Small API
2) You have a very nice display of your app flow with a nice diagram
Tamir Abutbul
- 7,301
- 7
- 25
- 53