Currently, there is a separate activity for each screen. Activities also have a lot of other responsibilities such as lifecycle management, platform interaction, etc. Fragments eliminate this problem by taking on the UI details and leaving the other responsibilities to the Activity.
Launching a separate activity for each app screen is terribly inefficient, since the system will try to keep them in memory as long as it can. Killing one wonβt free the resources used by the others. We should consider using Fragments whenever it's possible, as it makes the code easier to maintain and control.
For example: we can keep StartActivity and move AvatarActivity, AvatarRoomActivity to fragments.
Further information.