MCQ King
Android Studio – 19 – ViewPager in Android Studio
1 / 27
1. What is a ViewPager in Android development?
2 / 27
2. What is the primary purpose of a ViewPager in Android?
3 / 27
3. Which of the following is NOT a commonly used component of a ViewPager?
4 / 27
4. What is the purpose of a TextView in a ViewPager?
5 / 27
5. How can you add pages to a ViewPager in Android?
6 / 27
6. What is the role of a PagerAdapter in a ViewPager?
7 / 27
7. Which method is commonly used to set the PagerAdapter for a ViewPager?
8 / 27
8. What is the purpose of the notifyDataSetChanged() method in a ViewPager Adapter?
9 / 27
9. How can you handle page selection events in a ViewPager?
10 / 27
10. Which method is commonly used to handle page selection events in a ViewPager?
11 / 27
11. What is the primary purpose of the onPageSelected() method in a ViewPager?
12 / 27
12. How can you specify the layout for each page in a ViewPager?
13 / 27
13. What is the role of the layout XML files for ViewPager pages?
14 / 27
14. How can you add animations to page transitions in a ViewPager?
15 / 27
15. What is the purpose of the setPageTransformer() method in a ViewPager?
16 / 27
16. Which method is commonly used to set the current page of a ViewPager programmatically?
17 / 27
17. What is the purpose of the setCurrentItem() method in a ViewPager?
18 / 27
18. How can you add custom indicators for pages in a ViewPager?
19 / 27
19. What is the primary purpose of custom indicators in a ViewPager?
20 / 27
20. Which of the following is NOT a commonly used layout for ViewPager pages?
21 / 27
21. What is the purpose of a CardView in a ViewPager?
22 / 27
22. How can you specify the data source for a ViewPager in Android Studio?
23 / 27
23. What is the role of the PagerAdapter in a ViewPager?
24 / 27
24. How can you create a custom PagerAdapter class in Android Studio?
25 / 27
25. What is the purpose of the instantiateItem() method in a custom PagerAdapter for a ViewPager?
26 / 27
26. How can you specify the layout for each page in a custom PagerAdapter for a ViewPager?
27 / 27
27. What is the primary role of the instantiateItem() method in a custom PagerAdapter for a ViewPager?
Your score is
Restart quiz