Android Application Development (AND-401) — Question 108
Which of the following are benefits for using fragments in your application? (Choose two)
Answer options
- A. Simplify the reusability of UI components.
- B. Build different layouts for different device configurations.
- C. Add an action bar to your application.
- D. Dynamically add and remove UI components to an activity.
Correct answer: B, D
Explanation
Using fragments allows for creating different layouts tailored to various device configurations, which is crucial for responsive design. Additionally, they enable the dynamic addition and removal of UI components in an activity, enhancing the user experience. Options A and C, while beneficial, do not specifically relate to the core advantages of fragments.