A Fragment అనేది Activity లో నివసించే UI యొక్క పునర్ వినియోగ చేయగల భాగం — ఒక మాడ్యులర్, స్వీయ-నిర్మితమైన UI భాగం దీనికి సొంత జీవిత చక్రం ఉంటుంది. Fragments లचкदार, పునర్ వినియోగ చేయగల UIs ను సక్షమ చేస్తాయి మరియు ఆధునిక single-Activity ఆర్కిటెక్చర్లకు కేంద్రీయమైనవి.
Fragment అంటే ఏమిటి
A FRAGMENT = a reusable, modular piece of UI hosted inside an Activity:
→ has its OWN lifecycle (tied to but distinct from the host activity's)
→ multiple fragments can be combined in one activity; reused across activities
→ represents a portion of the screen (or a whole screen's content)
→ Think: an activity can host one or more fragments that make up its UI.
