Questions and Answers
What does a Fragment represent in an Activity?
An independent user interface
In what ways can you combine multiple fragments in a single activity?
As a multipane UI
Why is it beneficial to reuse a fragment in multiple activities?
To maintain consistent user interface
What is the purpose of creating a modular section of an activity using Fragment?
Signup and view all the answers
How do you create a fragment?
Signup and view all the answers
What is the main advantage of using fragments on larger screen devices like tablets?
Signup and view all the answers
What is the purpose of the onCreateView method in the context of adding a fragment to an activity?
Signup and view all the answers
In the context of adding a fragment to an activity at runtime, what is the role of FragmentManager?
Signup and view all the answers
Why is it important for the activity layout to include a fragment container View when dealing with fragments added at runtime?
Signup and view all the answers
What is the primary purpose of the FragmentTransaction in the context of adding fragments at runtime?
Signup and view all the answers
What is the purpose of the MenuInflater in the context of adding a fragment to an activity?
Signup and view all the answers
Why should initial fragments be added to an activity during its onCreate() method when dealing with fragments added at runtime?
Signup and view all the answers
What is the purpose of preparing a view container for the fragment when adding it to an activity at runtime?
Signup and view all the answers
What does LayoutInflater do in relation to adding a fragment to an activity?
Signup and view all the answers
Which option in Android allows you to store private primitive data in key-value pairs?
Signup and view all the answers
Where would you store public data on the shared external storage in Android?
Signup and view all the answers
What is the purpose of Room Database in Android?
Signup and view all the answers
In what situation would you use Network Connection/Cloud storage option in Android?
Signup and view all the answers
Which storage option in Android is suitable for storing private data on the device memory?
Signup and view all the answers
What type of data does Shared Storage option in Android cater to?
Signup and view all the answers
What is the primary purpose of a content provider in Android?
Signup and view all the answers
What does the SharedPreferences class in Android provide a framework for?
Signup and view all the answers
Which method is used to retrieve and hold the contents of the preferences file in Android?
Signup and view all the answers
What is the purpose of the MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE operating modes in Android?
Signup and view all the answers
What does the MODE_MULTI_PROCESS operating mode in Android enable?
Signup and view all the answers
What type of data can be saved using the SharedPreferences class in Android?
Signup and view all the answers
What is strongly discouraged in Android in terms of file creation mode?
Signup and view all the answers
Why should applications use more formal mechanisms like ContentProvider, BroadcastReceiver, and Service instead of 'MODE_WORLD_READABLE' and 'MODE_WORLD_WRITEABLE' constants?
Signup and view all the answers
What is the primary behavior enabled by the MODE_MULTI_PROCESS operating mode in Android?
Signup and view all the answers
What is discouraged when it comes to creating world-readable files in Android?
Signup and view all the answers