Deck 5: Menus, Sqlite

Full screen (f)
exit full mode
Question
The Blank Activity template automatically generates an XML file for a menu.
Use Space or
up arrow
down arrow
to flip the card.
Question
What encapsulates a menu item?

A) The Item class
B) The Item interface
C) The MenuItem class
D) The MenuItem interface
Question
We place the icon files for the menu in the ____________ directory.
Question
SQLite is available on Android devices.
Question
The ____________ class includes methods to execute SQL statements.
Question
LENGTH_SHORT is a constant of the Toast class that can be used to specify the duration of a Toast. What is the other constant that we can use to specify the duration of a Toast?

A) SHORT
B) LONG
C) TOAST_LONG
D) LENGTH_LONG
Question
The setOnCheckedChangeListener method of the RadioGroup class registers a listener on this ____________.
Question
The onCheckedChange method of the RadioGroup.OnCheckedChangeListener interface has the following API:
Void onCheckedChanged( RadioGroup group, int a )
What does group represent?

A) The View for this Activity
B) The radio button that was clicked
C) The RadioGroup to which the radio button that was clicked belongs
D) This Activity
Question
What method of the SQLiteOpenHelper class do we use to create or open a database on which we can perform operations?

A) getDatabase
B) getWritableDatabase
C) database
D) retrieveDatabase
Question
We created our own icon, nice.p n g, and placed it in the drawable directory; we can access it using the expression ____________.
Question
A Toast is a temporary ____________ that can be used to provide visual feedback.
Question
When extending SQLiteOpenHelper, what methods must we override?

A) onCreate and onUpgrade
B) create and upgrade
C) create and select
D) onCreate and onSelect
Question
We have three activities in an app: MainActivity, InsertActivity, and DeleteActivity. How many activity elements should we have in the AndroidManifest.xml file?

A) 0
B) 1
C) 2
D) 3
Question
We want to code a View, but we do not know how many radio buttons are in the View because we are retrieving the data from a database. We should code that View programmatically, not using an XML file.
Question
We can use the following method of the Toast class to create a Toast:
static Toast makeText( Context context, CharSequence text, int d )
The third parameter represents the duration or length of the Toast.
Question
The XML element for a menu is __________________.
Question
The XML element for an item in a menu is __________________.
Question
The XML attribute that we use to specify an icon for a menu item is __________________.
Question
The __________________ class encapsulates a table returned by a select SQL query.
Question
After we have created a Toast, we need to call the __________________ method so that the Toast is visible.
Question
The removeAllViewsInLayout method of the ViewGroup class __________________ all the Views in the ViewGroup that calls it.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/21
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Menus, Sqlite
1
The Blank Activity template automatically generates an XML file for a menu.
True
2
What encapsulates a menu item?

A) The Item class
B) The Item interface
C) The MenuItem class
D) The MenuItem interface
The MenuItem interface
3
We place the icon files for the menu in the ____________ directory.
drawable
4
SQLite is available on Android devices.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
5
The ____________ class includes methods to execute SQL statements.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
6
LENGTH_SHORT is a constant of the Toast class that can be used to specify the duration of a Toast. What is the other constant that we can use to specify the duration of a Toast?

A) SHORT
B) LONG
C) TOAST_LONG
D) LENGTH_LONG
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
7
The setOnCheckedChangeListener method of the RadioGroup class registers a listener on this ____________.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
8
The onCheckedChange method of the RadioGroup.OnCheckedChangeListener interface has the following API:
Void onCheckedChanged( RadioGroup group, int a )
What does group represent?

A) The View for this Activity
B) The radio button that was clicked
C) The RadioGroup to which the radio button that was clicked belongs
D) This Activity
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
9
What method of the SQLiteOpenHelper class do we use to create or open a database on which we can perform operations?

A) getDatabase
B) getWritableDatabase
C) database
D) retrieveDatabase
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
10
We created our own icon, nice.p n g, and placed it in the drawable directory; we can access it using the expression ____________.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
11
A Toast is a temporary ____________ that can be used to provide visual feedback.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
12
When extending SQLiteOpenHelper, what methods must we override?

A) onCreate and onUpgrade
B) create and upgrade
C) create and select
D) onCreate and onSelect
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
13
We have three activities in an app: MainActivity, InsertActivity, and DeleteActivity. How many activity elements should we have in the AndroidManifest.xml file?

A) 0
B) 1
C) 2
D) 3
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
14
We want to code a View, but we do not know how many radio buttons are in the View because we are retrieving the data from a database. We should code that View programmatically, not using an XML file.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
15
We can use the following method of the Toast class to create a Toast:
static Toast makeText( Context context, CharSequence text, int d )
The third parameter represents the duration or length of the Toast.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
16
The XML element for a menu is __________________.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
17
The XML element for an item in a menu is __________________.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
18
The XML attribute that we use to specify an icon for a menu item is __________________.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
19
The __________________ class encapsulates a table returned by a select SQL query.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
20
After we have created a Toast, we need to call the __________________ method so that the Toast is visible.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
21
The removeAllViewsInLayout method of the ViewGroup class __________________ all the Views in the ViewGroup that calls it.
Unlock Deck
Unlock for access to all 21 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 21 flashcards in this deck.