Android Layouts Quiz Form
Test your knowledge of Android layouts with this 10-question quiz. Answer all questions to the best of your ability.
What is the primary purpose of a ConstraintLayout in Android?
*
To position and size widgets in a flexible way using constraints
To display a list of items
To create scrollable containers
To handle user input events
Which layout would you use for displaying a vertical or horizontal list of items?
*
LinearLayout
FrameLayout
RelativeLayout
TableLayout
Select all attributes that can be used to align a view within a RelativeLayout.
*
layout_alignParentTop
layout_centerInParent
layout_alignBaseline
layout_marginStart
Which XML tag is used to define a GridLayout in Android?
*
1
2
3
4
What attribute controls the spacing between child elements in a LinearLayout?
*
android:divider
android:spacing
android:gap
android:padding
Which layout is best suited for stacking views on top of each other?
*
FrameLayout
LinearLayout
ConstraintLayout
TableLayout
In a TableLayout, how do you specify that a cell should span multiple columns?
*
android:layout_span
android:colSpan
android:spanColumns
android:mergeCells
Which layout allows you to position child views relative to each other or to the parent?
*
RelativeLayout
FrameLayout
LinearLayout
ConstraintLayout
Name one advantage of using ConstraintLayout over nested LinearLayouts.
*
Write the XML attribute used to set the orientation of a LinearLayout.
*
Submit Quiz
Should be Empty: