Question
1. Please check all of the traits that make fragments useful. They are reusable They can be used to build a flexible UI Fragments have
1. Please check all of the traits that make fragments useful.
- They are reusable
- They can be used to build a flexible UI
- Fragments have the same lifecycle as their host activity
- You can dynamically add or remove them during runtime
- All of the above
2. What is the right sequence in order to dynamically display a fragment.
For example, to start a new activity: A) Create a new Intent that points to the new activity, B) Add any information you want to that Intent, C) Start the intent. The right sequence is ABC.
A- Create a new fragment instance in a host activity
B- Create a new fragment class that inflates a layout
C- Create a layout that defines the appearance of the fragment
D- Add the fragment to it's host activity using the FragmentManager and a fragment transaction
- ABDC
- ADBC
- CBAD
- DACB
- DCBA
3. Which callback method is called when the Fragments user interface becomes visible but is not yet active?
- onCreateView()
- onStart()
- onPause()
- onResume()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started