Google News
logo
Android - Interview Questions
What is a fragment in Android?
The fragment in Android is as follows :
 
* A fragment has its own layout and behavior with its own life cycle callbacks.
* Fragments can be added or removed in an activity while the activity is running and used in multiple activities.
* Multiple fragments can be combined in a single activity to build a multi-pane UI.
* The fragment life cycle is closely related to the life cycle of its host activity which means when the activity is paused, all the fragments available in the activity will also be stopped
* Fragments were added to the Android API in the Honeycomb version of Android API version 11.
Advertisement