Fragment is just a kind of sub-activity which is used to build a multi-pane UI and reuse a fragment in multiple activities. Fragments has their own life-cycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a “sub activity” that you can reuse in different activities).
Source code : http://technxt.net/how-to-implement-d...
Facebook : / technxtcodelabs