- What is single activity architecture Android?
- Why use fragments instead of activities?
- What is navigation component in Android?
What is single activity architecture Android?
This pattern defends that instead of using an activity for each screen, the app is built with a single activity that works as a container for fragments that will be replaced for each screen, and manage through a stack. The core idea is to change the activities for fragments.
Why use fragments instead of activities?
Activities are an ideal place to put global elements around your app's user interface, such as a navigation drawer. Conversely, fragments are better suited to define and manage the UI of a single screen or portion of a screen. Consider an app that responds to various screen sizes.
What is navigation component in Android?
Navigation refers to the interactions that allow users to navigate across, into, and back out from the different pieces of content within your app. Android Jetpack's Navigation component helps you implement navigation, from simple button clicks to more complex patterns, such as app bars and the navigation drawer.