MCQ King
Android Studio – 7 – XML Layout Files in Android
1 / 26
1. What is XML in the context of Android development?
2 / 26
2. What is the primary purpose of XML layout files in Android apps?
3 / 26
3. Which XML attribute is used to specify the width of a view in Android XML layout?
4 / 26
4. What is the XML namespace typically used for Android layout XML files?
5 / 26
5. Which XML element is used to define the root layout of an Android XML layout file?
6 / 26
6. Which XML attribute is used to set the background color of a view in Android?
7 / 26
7. What is the purpose of the “xmlns:app” namespace in Android XML layout files?
8 / 26
8. What is the XML attribute used to specify the unique identifier (ID) of a view?
9 / 26
9. What is the primary purpose of the “xmlns:tools” namespace in Android XML layout files?
10 / 26
10. Which XML attribute is used to set the text size of a TextView in Android?
11 / 26
11. Which XML element is used to define a button in Android XML layout?
12 / 26
12. What is the primary purpose of the “xmlns:android” namespace in Android XML layout files?
13 / 26
13. Which XML attribute is used to set the text color of a TextView in Android?
14 / 26
14. What is the XML attribute used to specify the layout width and height of a view as “wrap_content” in Android?
15 / 26
15. What is the purpose of the “xmlns:xmlns” namespace in Android XML layout files?
16 / 26
16. Which XML element is used to define an image view in Android XML layout?
17 / 26
17. What is the XML attribute used to specify the padding of a view in Android?
18 / 26
18. What is the purpose of the “xmlns:xmlns” namespace in Android XML layout files?
19 / 26
19. Which XML element is used to define a text view in Android XML layout?
20 / 26
20. What is the XML attribute used to specify the text content of a TextView in Android?
21 / 26
21. What is the purpose of the “xmlns:xmlns” namespace in Android XML layout files?
22 / 26
22. Which XML element is used to define an edit text view in Android XML layout?
23 / 26
23. What is the XML attribute used to specify the layout weight of a view in Android?
24 / 26
24. What is the purpose of the “xmlns:app” namespace in Android XML layout files?
25 / 26
25. Which XML element is used to define an image button in Android XML layout?
26 / 26
26. What is the XML attribute used to specify the layout gravity of a view in Android?
Your score is
Restart quiz