quiz 5
In which version of Android was the Toolbar introduced?	
*5.0	
4.0		
6.0	

What was the previous object that represented a navigation bar?	
NavigationBar	
*ActionBar
Toolbar

Where is a Toolbar placed in the Activity?
*It depends on the Layout	
At the top of the screen	
At The bottom of the screen	
On the left side of the screen

What resource object is used to specify the layout of the Toolbar?
Toolbar	In
Navigation	
MenuItem	
* Menu	

What resource object specifies what will be in the menu?	
Option	
*Item	
MenuItem	
MenuOption	I

What controls the order of the items in a menu?
*The orderInCategory parameter	
The order they are declared	
The alphabetical order of the titles

In which function should you inflate the menu?	
onCreate	
*onCreateOptionsMenu	
onResume 	

Which function gets called in response to the user picking an item from the menu?	
*onOptionsItemSelected	
onClick	
onMenuItemSelected	

What is the design pattern that is used for creating DialogBoxes? 	
Dialog pattern	
Model/View/Controller	
Visitor pattern	
*Builder pattern

What function do you call to set the view of a Dialog box?	
setLayout	
*setView	
setPositiveButton	
setNegativeButton


Quiz 4
In an AsyncTask, which function runs on a background thread?	
*doInBackground	
onProgressUpdate
execute	

In an AsyncTask, which function runs on the main GUI thread?
doInBackground	
*onProgressUpdate	
publishProgress

In an XMLPullParser, which is the first event type that happens?	
*START_DOCUMENT	
END_DOCUMENT	
START_TAG	
END_TAG	

In an XMLPullParser, which event type corresponds to this tag: </Temperature>?	
START_DOCUMENT	
END_DOCUMENT	
START_TAG	
*END_TAG	Correct

In an XMLPullParser, which event type corresponds to "Hi" in this example: <Text> Hi </Text>?	
STRING	
*TEXT	
START_TAG	
END_TAG	

Which function in Android returns the directory for opening files?	
*getFilesDir	
fileList	
getExternalFilesDir	

Which permissions do you need to write to an External Folder?	
WRITE_FILE	
*WRITE_EXTERNAL_STORAGE	
WRITE_STORAGE 	

If a tablet has a screen size of 800x600 pixels, which folder name should you use to create a layout for this tablet?
*layout-sw600dp	
layout-sw720dp	
layout-sw900dp	

Which function should you use to inflate the view of a Fragment? 	
onCreate	
onStart	
onCreateView	I
*onAttach

What object is used to create a FragmentTransaction?	
Activity	
*FragmentManager	
Context	
TransactionManager	

What XML tag should you put in an XML layout to show where a Fragment should go?	
<Frame>	
<FragmentLayout>	
*<FrameLayout>	
<FragmentSpace>	