Activities are the full screen components in the app with the toolbar, everything else are preferably Fragments.
One full screen parent activity with a toolbar can have multiple panes, scrollable pages, dialogs, etc. (all fragments), all of which can be accessed from the parent and communicate via the parent.
Example:
Activity A, Activity B, Activity C:
- All activities need to have same code repeated, to show a basic
toolbar for example, or inherit from a parent activity (becomes
cumbersome to manage).
- To move from one activity to the other, either all of them need to be in memory (overhead) or one needs to be destroyed for the other to open.
- Communication between activities can be done via Intents.
vs
Activity A, Fragment 1, Fragment 2, Fragment 3:
- No code repetition, all screens have toolbars etc. from that one activity.
- Several ways to move from one fragment to next - view pager, multi pane etc.
- Activity has most data, so minimal inter-fragment communication needed. If still necessary, can be done via interfaces easily.
- Fragments do not need to be full screen, lots of flexibility in designing them.
- Fragments do not need to inflate layout if views are not necessary.
- Several activities can use the same fragment.