MCQ King
Android Studio – 14 – Working with Views and ViewGroups
1 / 26
1. What are Views and ViewGroups in Android development?
2 / 26
2. Which of the following is an example of a ViewGroup in Android?
3 / 26
3. What is the purpose of a ViewGroup in Android?
4 / 26
4. Which of the following is an example of a View in Android?
5 / 26
5. What is the purpose of a View in Android?
6 / 26
6. Which ViewGroup is commonly used to create a vertical list of items in Android?
7 / 26
7. Which ViewGroup is commonly used to create a grid of items in Android?
8 / 26
8. Which ViewGroup is commonly used for creating complex user interfaces with constraints in Android?
9 / 26
9. What is the primary role of a TextView in Android?
10 / 26
10. How can you add a View to a ViewGroup in Android Studio?
11 / 26
11. Which of the following is NOT a commonly used attribute for configuring Views in Android?
12 / 26
12. How can you specify the position of a View within a ViewGroup using a LinearLayout?
13 / 26
13. What is the purpose of the “id” attribute for Views in Android?
14 / 26
14. What is the purpose of the “layout_width” and “layout_height” attributes for Views in Android?
15 / 26
15. How can you specify the position of a View within a RelativeLayout in Android Studio?
16 / 26
16. Which attribute is used to define the width and height of a View in Android?
17 / 26
17. Which attribute is used to specify the text content of a TextView in Android?
18 / 26
18. What is the purpose of the “layout_gravity” attribute for Views in Android?
19 / 26
19. How can you specify the position of a View within a GridLayout in Android Studio?
20 / 26
20. Which ViewGroup allows you to create a flexible and responsive user interface layout in Android?
21 / 26
21. How can you add padding to a View in Android Studio?
22 / 26
22. What is the purpose of the “layout_margin” attribute for Views in Android?
23 / 26
23. Which of the following attributes is used to add spacing between Views in a ViewGroup?
24 / 26
24. What is the purpose of the “visibility” attribute for Views in Android?
25 / 26
25. How can you hide a View in Android Studio?
26 / 26
26. What is the purpose of the “layout_weight” attribute for Views in a LinearLayout?
Your score is
Restart quiz