Een Fragment is een herbruikbaar UI-onderdeel dat zich binnen een Activity bevindt — een modulaire, zelf-contained UI-component met zijn eigen lifecycle. Fragments maken flexibele, herbruikbare UI's mogelijk en zijn centraal in moderne single-Activity architecturen.
Wat een Fragment is
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.
