Junior — Middle
What is the advantage of using Fragment compared to Activity in terms of resource consumption?
sobes.tech AI
Answer from AI
Fragments consume fewer resources compared to Activities because they are part of an Activity and do not require a separate lifecycle and context. Using fragments allows for reusing UI components, reducing overhead for creation and destruction, and also simplifies navigation and state management within a single Activity.