MCQ King
Android Studio – 9 – Fragment Lifecycle in Android
1 / 26
1. What is a Fragment in Android development?
2 / 26
2. Which method is called when a Fragment is first created?
3 / 26
3. Which method is called when a Fragment becomes visible to the user?
4 / 26
4. Which method is called when a Fragment is no longer visible to the user?
5 / 26
5. Which method is called when a Fragment is paused and can no longer respond to user input?
6 / 26
6. Which method is called when a Fragment is resumed after being paused?
7 / 26
7. Which method is called when a Fragment is stopped and can no longer be seen by the user?
8 / 26
8. Which method is called when a Fragment is destroyed and its resources are released?
9 / 26
9. Which method is called when a Fragment is attached to an activity?
10 / 26
10. In which order are the onCreate(), onCreateView(), and onResume() methods called when a Fragment is first created?
11 / 26
11. In which order are the onPause(), onStop(), and onDestroy() methods called when a Fragment is being destroyed?
12 / 26
12. Which method is called when a Fragment is detached from an activity?
13 / 26
13. What is the purpose of the onCreateView() method in the Fragment Lifecycle?
14 / 26
14. What is the purpose of the onStart() method in the Fragment Lifecycle?
15 / 26
15. What is the purpose of the onStop() method in the Fragment Lifecycle?
16 / 26
16. What is the purpose of the onRestart() method in the Fragment Lifecycle?
17 / 26
17. Which method is called when a Fragment is paused and another Fragment comes into focus?
18 / 26
18. Which method is called when a Fragment is stopped and another Fragment comes into focus?
19 / 26
19. Which method is called when a Fragment is destroyed and another Fragment comes into focus?
20 / 26
20. What is the purpose of the onDestroy() method in the Fragment Lifecycle?
21 / 26
21. What is the purpose of the onSaveInstanceState() method in the Fragment Lifecycle?
22 / 26
22. Which method is called when a Fragment is paused and the user interacts with another Fragment?
23 / 26
23. Which method is called when a Fragment is stopped and the user interacts with another Fragment?
24 / 26
24. Which method is called when a Fragment is destroyed and the user interacts with another Fragment?
25 / 26
25. What is the purpose of the onActivityCreated() method in the Fragment Lifecycle?
26 / 26
26. Which method is called when a Fragment is paused and the user presses the back button?
Your score is
Restart quiz