AND-801 practice question 5 of 10
Fill in the blank space in the following sentence with the correct choice: The..................... to arranges widgets in positions relative each other.
Full set: 45 questionsRelativeLayout is a ViewGroup subclass used to specify the position of child View objects relative to each other or to the parent ViewGroup. It allows for complex layouts without nesting multiple LinearLayout groups. For example, a widget can be positioned "below" or "to the right of" another widget, or "aligned to the parent's bottom edge." While ConstraintLayout is a more modern and flexible alternative, RelativeLayout is the classic layout whose primary definition is arranging widgets in positions relative to each other.
B. TableLayout: This layout arranges child views into a grid of rows and columns, not based on their relative positions to one another.
C. LinearLayout: This layout arranges child views in a single direction, either vertically or horizontally, in a sequential order.
D. ConstraintLayout: While it also positions views relative to others, it does so using a system of "constraints." RelativeLayout is the specific layout whose name and fundamental concept directly match the question's phrasing.
1. Official Android Developer Documentation, "RelativeLayout": "RelativeLayout is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left of or below another view) or in positions relative to the parent RelativeLayout area (such as aligned to the bottom, left, or center)."
Source: https://developer.android.com/guide/topics/ui/layout/relative-layout
2. Purdue University, CS 390-17 Courseware, "Lecture 06: UI Layouts": In the section describing RelativeLayout, the document states, "Allows you to specify the location of child objects relative to each other or to the parent."
Source: Page 20, https://www.cs.purdue.edu/homes/bxd/390-17/lects/06-UI-Layouts.pdf
3. Official Android Developer Documentation, "Build a Responsive UI with ConstraintLayout": "It's similar to RelativeLayout in that all views are laid out according to relationships between sibling views and the parent layout, but it's more flexible and easier to use with Android Studio's Layout Editor." This reference confirms the fundamental principle of RelativeLayout while introducing its successor.
Source: https://developer.android.com/training/constraint-layout, Introduction section, Paragraph 1.
Keep practicing
Take the free AND-801 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AND-801 practice questions
- Question 1Android SDK platform is a set of libraries and APIs that provide necessary classes, metho…
- Question 2Which of the below choices is the best answer to fill the empty space in the following se…
- Question 7In Android Studio 3.0 and higher, a checkbox is available to drag-and-drop from the palet…
- Question 9Assume you were given the code of an Android app that include a Google Map. When you chec…
