A Fragment huwa parti rjusabbli tal-UI li tgħix ġewwa Activity — komponent UI modulari u awtonoms b'siklun tal-ħajja tiegħu stess. Il-Fragments jippermettu UIs flessibli u rjusabbli u huma ċentrali għal arkitetturi moderni ta' attività wieħda.
X'inhu 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.
