Why Choose Us?
0% AI Guarantee
Human-written only.
24/7 Support
Anytime, anywhere.
Plagiarism Free
100% Original.
Expert Tutors
Masters & PhDs.
100% Confidential
Your privacy matters.
On-Time Delivery
Never miss a deadline.
Algonquin College CST 2335 Quiz 2: 1)Which function gets called first in the Android Lifecycle: onStart b
Algonquin College
CST 2335
Quiz 2:
1)Which function gets called first in the Android Lifecycle:
-
- onStart
b. onCreate
c. onResume
- Which function gets called last in the Android Lifecycle:
- onPause
- onStop
c. onDestroy
- When is the bundle parameter for the onCreate(Bundle savedInstance) null?
a. When the application is loaded for the first time
b. When onSaveInstance was called previously
- If the bundle parameter for the onCreate(Bundle savedInstance) is not null, which function gets called automatically?
a. onRestoreInstanceState(Bundle savedInstanceState)
b. onSaveInstanceState(Bundle outState)
- What does the first parameter in getSharedPreferences("a_string", Context.MODE_PRIVATE)?
- The string to retrieve
b. The file name
c. The string to save
- When you call putString("string_one", "string_two"), which string that represents the value (not name)?
- "string_one"
b. "string_two"
c. Unknown
- Which function must you call to retrieve the saved string from the sharedPreferences call: putString("string_one", "string_two")
a. getString("string_one", "string_three")
b. getString("string_two", "string_three")
- Which function must you call to start an activity when you want to get data back?
- startActivity()
- startActivityForData()
c. startActivityForResult()
- What function must you call to end an Activity?
- endActivity()
b. finish()
c. finishActivity()
- If you call setResult(Activity.RESULT_OK), what will be the value of the request code parameter in onActivityResult(int request, int result, Intent data)?
- RESULT_OK
- 5
c. Unknown
- What is the proper format for creating a Toast message
a. Toast.makeText(getApplicationContext(), "The message", Toast.LENGTH_SHORT);
- Toast.makeText("The message", getApplicationContext(), Toast.LENGTH_SHORT);
- Toast.makeText(Toast.LENGTH_SHORT, "The message", getApplicationContext());
- What design pattern is used when chaining many function calls for creating an AlertDialog: dialog.setMessage().setTitle().setPositiveButton().setNegativeButton().show();?
a. The alert pattern
b. The builder pattern
c. The command pattern
- Which Log function should I call to show warning information?
- Log.d()
- Log.i()
c. Log.w()
Expert Solution
PFA
Archived Solution
You have full access to this solution. To save a copy with all formatting and attachments, use the button below.
For ready-to-submit work, please order a fresh solution below.





