Android Application Development (AND-401) — Question 107
Which of the following statements is NOT correct about Android fragments?
Answer options
- A. Multiple fragments can be combined in a single activity.
- B. The life-cycle of a fragment is totally independent of the activity hosting it.
- C. Fragments have their own life-cycle.
- D. You can add/remove fragments to and an activity dynamically, i.e. while the activity is running.
Correct answer: B
Explanation
The correct answer is B because the life-cycle of a fragment is closely tied to the activity that hosts it, meaning they are not entirely independent. Options A, C, and D are accurate statements regarding the characteristics and functionality of fragments in Android development.