एक Fragment हा एक पुनर्वापरण्यायोग्य UI भाग आहे जो एका Activity मध्ये राहतो — एक मॉड्यूलर, स्व-समाविष्ट 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.
