Deck 5: Investigate Android Lists, Arrays, and Web Browsers
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 5: Investigate Android Lists, Arrays, and Web Browsers
1
Which of the following terms provides a data model for the layout of the list?
A) abstraction
B) adapter
C) blueprint
D) skeleton
A) abstraction
B) adapter
C) blueprint
D) skeleton
B
2
Displays of lists are rarely used as a design pattern in mobile applications.
False
3
Switch statements do not allow ranges such as 10-40 to match a case.
True
4
An adapter provides a data model for the layout of the list.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Which ListView control provides a two-level list?
A) DoubleListView
B) MultiListView
C) AdvancedListView
D) ExpandableListView
A) DoubleListView
B) MultiListView
C) AdvancedListView
D) ExpandableListView
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
What is the generic layout to a simple list?
A) simple_list_item_1
B) simple_list_item_2
C) simple_list_item_checked
D) simple_list_item_multiple_choice
A) simple_list_item_1
B) simple_list_item_2
C) simple_list_item_checked
D) simple_list_item_multiple_choice
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
A URL is a URI with additional information necessary for gaining access to the resources required for posting the page.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Which type of control do you use to contain a list of items that allows a user to select an item in the list for further action?
A) ArrayView
B) TableLayout
C) ListView
D) RadioGroup
A) ArrayView
B) TableLayout
C) ListView
D) RadioGroup
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
The first element in an array is referenced using index 0.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
What method projects your data to the onscreen list by connecting a ListView object to array data?
A) createViewAdapter method
B) projectArrayAdapter method
C) setListAdapter method
D) useListAdapter method
A) createViewAdapter method
B) projectArrayAdapter method
C) setListAdapter method
D) useListAdapter method
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
In what is the reference for an array enclosed?
A) {}
B) []
C) ()
D) -
A) {}
B) []
C) ()
D) -
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
An array is a container object that holds a fixed number of values of different data types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
To declare an array without assigning actual values, allocate the size of the array in brackets to reserve the room needed in memory.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
If the primary purpose of a class is to display a ListView control, which of the following controls is recommended to extend the class from?
A) Activity
B) ListActivity
C) SelectionActivity
D) ViewingActivity
A) Activity
B) ListActivity
C) SelectionActivity
D) ViewingActivity
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Which variable allows you to store multiple values in one variable at the same time?
A) array variable
B) index variable
C) list variable
D) temporary variable
A) array variable
B) index variable
C) list variable
D) temporary variable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
If a Java View list exceeds the length of the screen, what is done to the list?
A) the list is made scrollable
B) the list is paginated
C) the list is shrunk to fit
D) the list is truncated
A) the list is made scrollable
B) the list is paginated
C) the list is shrunk to fit
D) the list is truncated
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
A switch statem ent can also be implemented as a chain of if/else statements.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Each time you add a class to an application, the class should begin with a lowercase letter and a coordinating XML layout file with the same name with an uppercase letter is automatically created.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
It is not necessary to use the break keyword to end a case statement; it is automatically terminated by the next case keyword.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Which of the following controls allows you to create a two-level list?
A) ExpandableListView control
B) ListView control
C) MajorListView
D) TwoListView control
A) ExpandableListView control
B) ListView control
C) MajorListView
D) TwoListView control
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Which intent action opens a Web browser on the Android?
A) ACTION_VIEW
B) BROWSE_VIEW
C) HTTP_VIEW
D) WEB_VIEW
A) ACTION_VIEW
B) BROWSE_VIEW
C) HTTP_VIEW
D) WEB_VIEW
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
What statement should you put at the end of a switch statement if you want a block of code to be executed in the event none of the case statement values matches?
A) default:
B) option:
C) try:
D) execute:
A) default:
B) option:
C) try:
D) execute:
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
What is used so apps can talk to each other in a very simple way?
A) activities
B) classes
C) intents
D) values
A) activities
B) classes
C) intents
D) values
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
When a list item is selected, what part of it is passed to the executing code?
A) bytecode
B) name
C) position
D) signature
A) bytecode
B) name
C) position
D) signature
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Where is the strings.xml file located?
A) res/drawable-hdpi folder
B) res/drawable-mdpi folder
C) res/layout folder
D) res/values folder
A) res/drawable-hdpi folder
B) res/drawable-mdpi folder
C) res/layout folder
D) res/values folder
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
Which method is called when an item in a list is selected?
A) clicked
B) itemClicked
C) itemWasClicked
D) onListItemClick
A) clicked
B) itemClicked
C) itemWasClicked
D) onListItemClick
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
What should end the block of code in each case statement to prevent the subsequent case statement from being executed as well?
A) default;
B) break;
C) exit;
D) end;
A) default;
B) break;
C) exit;
D) end;
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Each item in the array is identified using a(n) ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The code to access the fifth element of an array called names is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
Which of the following is the correct syntax for the beginning of a switch stat ement that evaluates a variable named choice ?
A) case(choic e):
B) switch [choice ] {
C) case[choice]:
D) switch(choice) {
A) case(choic e):
B) switch [choice ] {
C) case[choice]:
D) switch(choice) {
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
What is the generic layout that displays checkboxes?
A) boxed_list_item
B) checked_list_item
C) list_item_checked
D) simple_list_item_checked
A) boxed_list_item
B) checked_list_item
C) list_item_checked
D) simple_list_item_checked
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
The code to declare and initialize an array (in one statement) called fruit that holds the strings "Apple" , "Mango" , and "Pear" , in that order, is _____________________________________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Which statement allows you to evaluate a value and execute a block of statements based on an integer or single character input?
A) choose statement
B) case statement
C) select statement
D) switch statement
A) choose statement
B) case statement
C) select statement
D) switch statement
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
What does the acronym URL stand for?
A) Uniform Resource Locator
B) Universal Redirection Locale
C) Usual Random Lesson
D) Utility Rendering Logo
A) Uniform Resource Locator
B) Universal Redirection Locale
C) Usual Random Lesson
D) Utility Rendering Logo
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Each individual item in an array is called a(n) ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
Suppose you wanted to declare a variable called mat that is an array of arrays of ints. The code to declare this variable would be ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Which XML code statement places an icon named ic_city . P n g to the right of the text in a ListView display?
A) android:drawableRight="@drawable/ic_city"
B) android:iconRight="@icon/ic_city"
C) icons:drawableRight="@drawable/ic_city"
D) icons:iconRight="@icon/ic_city"
A) android:drawableRight="@drawable/ic_city"
B) android:iconRight="@icon/ic_city"
C) icons:drawableRight="@drawable/ic_city"
D) icons:iconRight="@icon/ic_city"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Which browser is not supported in Android?
A) Firefox
B) Internet Explorer
C) Opera
D) Dolphin
A) Firefox
B) Internet Explorer
C) Opera
D) Dolphin
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Which statement in a custom XML layout for a ListView sets the size of the test to 20sp?
A) android:textSize="20sp"
B) ListView:textSize="20sp"
C) android:text="20sp"
D) ListView:text="20sp"
A) android:textSize="20sp"
B) ListView:textSize="20sp"
C) android:text="20sp"
D) ListView:text="20sp"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
When opening a Web site with an intent, what is the last argument?
A) image
B) string
C) URI
D) URL
A) image
B) string
C) URI
D) URL
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Typically, each case option in a switch statement ends with the keyword ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Testing an Android app is called ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
The standard generic layout for ListView is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
The type of a ListAdapter that operates on an array of String objects is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
A Web site address may also be called a(n) ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
The code to declare and initialize an empty array of 10 ints, called "digits" , is ______________________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
A browser is launched with Android code using a(n) ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
URI is short for ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
In a switch statement, each option must begin with the ____________________ keyword.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The name of the key found in strings.xml that determines the string displayed as the title of the app is ______________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck