Answer the question
In order to leave comments, you need to log in
Do I need to create a separate activity for each screen?
When creating a project in android with a preset menu, a project is created with one activity and with several fragments for each menu item.
If I myself try to add a new fragment + viewmodel combination, then android studio also creates another activity in addition.
I'm just starting to dive into android development and it's still not entirely clear.
Answer the question
In order to leave comments, you need to log in
No, it doesn `t need. There should be one activity. There is one fragment per screen.
It is possible on activity, it is possible on fragments, the main thing is to understand the difference, and why it is better on fragments.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question