Podcast
Questions and Answers
What is the primary purpose of fragments in Android?
What is the primary purpose of fragments in Android?
- To define the life cycle events for an activity
- To provide a way to handle user confirmations when closing an activity
- To act as miniature activities that can be grouped to form an activity (correct)
- To enable activities from different applications to work together seamlessly
What is the role of an Intent in Android?
What is the role of an Intent in Android?
- To define the layout of an activity's user interface
- To handle the life cycle events of an activity
- To create a new instance of an activity
- To enable seamless communication and task coordination between different applications (correct)
Which life cycle method is called when an activity becomes visible to the user?
Which life cycle method is called when an activity becomes visible to the user?
- onStart() (correct)
- onPause()
- onCreate()
- onResume()
Which life cycle method is called when an activity starts interacting with the user?
Which life cycle method is called when an activity starts interacting with the user?
What is the purpose of the onDestroy() life cycle method?
What is the purpose of the onDestroy() life cycle method?
What is the correct order of life cycle methods when an activity is created and then stopped?
What is the correct order of life cycle methods when an activity is created and then stopped?
Which file is used to declare an activity in an Android application?
Which file is used to declare an activity in an Android application?
Which life cycle method is called when an activity has been stopped and is restarting again?
Which life cycle method is called when an activity has been stopped and is restarting again?
What is the base class that an activity must extend in order to be created?
What is the base class that an activity must extend in order to be created?
Which life cycle method is called when the current activity is being paused and the previous activity is being resumed?
Which life cycle method is called when the current activity is being paused and the previous activity is being resumed?
Flashcards are hidden until you start studying