A Fragment என்பது ஒரு Activity க்குள் வாழ்கின்ற UI இன் மீண்டும் பயன்படுத்தக்கூடிய பகுதி — ஒரு மডுலார், சுயமாக உள்ளடக்கிய UI கூறு அதன் சொந்த lifecycle உடன். Fragments நমনீயமான, மீண்டும் பயன்படுத்தக்கூடிய UIs ஐ செயல்படுத்த உதவுகிறது மற்றும் நவீன single-Activity architectures க்கு முக்கியமாக உள்ளது.
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.
