Deck 7: Reveal Displaying Pictures in a Gridview

Full screen (f)
exit full mode
Question
Which of the following is NOT an attribute of a GridView control?

A) leftMargin
B) numColumns
C) columnWidth
D) verticalSpacing
Use Space or
up arrow
down arrow
to flip the card.
Question
What type of control is usually used to select a wallpaper image for the Android device background?

A) GridView
B) ImageViewer
C) MediaPlayer
D) TextView
Question
To meet the goal of providing a clean, professional effect with images in an application, Android provides a layout tool called ScrollView.
Question
A grid of images is not very useful for selecting wallpaper because of the large number of options.
Question
Using controls such as the GridView and Spinner, what binds specific types of data and displays that data in a particular layout?

A) adapter
B) context
C) editor
D) view
Question
What is typically used to assign values to a GridView control that has multiple items?

A) array
B) boolean
C) integer
D) String
Question
What should you use to declare a variable that cannot be changed?

A) local
B) final
C) temp
D) static
Question
Any method that is not declared void must contain a return statement with a corresponding return value.
Question
When you add a new class that extends a base class, the method stubs that need implementation are auto-generated.
Question
The GridView control, while very useful for displaying images, cannot be customized.
Question
What is the first GridView control in a project named by default?

A) control1
B) defaultGallery
C) gridView1
D) theGallery
Question
Which of the following variable types can be accessed from multiple methods throughout an application?

A) Static
B) Class-level
C) Local-level
D) Temporary
Question
If you wish, you can scale grid images to the full size of the screen.
Question
What is used to identify each element in an array?

A) counter
B) index
C) position
D) reference
Question
The position argument in the OnItemClick method is a numeric value that holds which quadrant of the screen an item can be found.
Question
Which of the following terms defines a rectangular area of the screen that displays an image or text object.

A) Expanse container
B) Layout container
C) Space container
D) View container
Question
The GridView control is the only control that monitors for tap or click events.
Question
A View represents a piece of the screen area that displays an object.
Question
The length of an array is one more than the maximum subscript number.
Question
What category of the Palette does the control GridView sit in?

A) Images category
B) Composite category
C) Media category
D) Viewing category
Question
Which method provides a number of arguments to its registered listeners?

A) tapped method
B) clicked method
C) onTap method
D) onItemClick method
Question
The code to reference an image called panda . P n g is ____________________.
Question
Which is a common aspect ratio?

A) 4:3
B) 3:4
C) 16:8
D) 10:6
Question
Where do you specify a method's return type?

A) in its body
B) in its declaration
C) in its last line
D) in its name
Question
When the ImageAdapter class is called, which method determines how many pictures should be displayed in the GridView control?

A) count() method
B) getCount() method
C) getNumber() method
D) getSize() method
Question
Which of the following terms best describes the fractional relation of the width of an image compared with its height?

A) aspect ratio
B) framing ratio
C) scaling ratio
D) x-to-y ratio
Question
Which attribute in XML code can be used to place an image on the surface of a Button control?

A) a ndroid:image
B) image:src
C) image:path
D) android:src
Question
Which of the following is the scaling option that scales an image to fit the View type?

A) ImageView.ScaleType. CENTER
B) ImageView.ScaleType. CENTER_CROP
C) ImageView.ScaleType. FIT_SIZE
D) ImageView.ScaleType. FIT_XY
Question
Which of the following variables is used to load and access resources for the application?

A) App variable
B) Context variable
C) Program variable
D) System variable
Question
The method to set an image to an ImageView control is ____________________.
Question
What is used to initialize the instance variables of an object?

A) reference
B) class
C) constructor
D) method
Question
In Android programs, you can place the ____________________ method in another method that is triggered only when the user touches the GridView control.
Question
What is the return type of a method that returns nothing?

A) double
B) int
C) null
D) void
Question
Which argument of the onItemClick method determines the row of the selected item?

A) id
B) view
C) position
D) parent
Question
Which statement do you place at the end of a method if the method sends a value to the statement that called it?

A) public
B) default
C) return
D) case
Question
Which argument of the onItemClick method holds the value of the array element in the View adapter?

A) parent
B) view
C) position
D) id
Question
Which of the following is true about toast notifications?

A) They never receive focus
B) They are of fixed duration
C) They are limited to twenty characters
D) They message cannot contain a variable
Question
The ____________________ method provides the data model for the GridView layout.
Question
Which scaling option does not scale or change the aspect ratio of an image?

A) ImageView.ScaleType. CENTER
B) ImageView.ScaleType. CENTER_CROP
C) ImageView.ScaleType. FIT_SIZE
D) ImageView.ScaleType. FIT_XY
Question
Using a(n) __________________ control, users can quickly scroll through a listing of thumbnail-sized pictures.
Question
A(n) ____________ container can include layouts such as GridView, RadioGroup, and ListView.
Question
The ______________________ ScaleType option centers the image within the View type and scales it uniformly.
Question
The code to resize an image variable pic to 275x200 is ____________________.
Question
A(n) ____________________ is a series of statements that perform some repeated task.
Question
The most powerful method in the ImageAdapter class is the ____________________ method.
Question
The code to find the size of an array called fruit is ____________________.
Question
________________ can change the displayed size of an image and keeps or changes the aspect ratio of the image within the ImageView control.
Question
To use a toast message within an onItemClick method, you must replace MainActivity.this with a Context class called _________________.
Question
The method to scale an ImageView a certain way is ____________________.
Question
A(n) ____________________ is used to initialize the instance variables of an object.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Reveal Displaying Pictures in a Gridview
1
Which of the following is NOT an attribute of a GridView control?

A) leftMargin
B) numColumns
C) columnWidth
D) verticalSpacing
A
2
What type of control is usually used to select a wallpaper image for the Android device background?

A) GridView
B) ImageViewer
C) MediaPlayer
D) TextView
A
3
To meet the goal of providing a clean, professional effect with images in an application, Android provides a layout tool called ScrollView.
False
4
A grid of images is not very useful for selecting wallpaper because of the large number of options.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Using controls such as the GridView and Spinner, what binds specific types of data and displays that data in a particular layout?

A) adapter
B) context
C) editor
D) view
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
What is typically used to assign values to a GridView control that has multiple items?

A) array
B) boolean
C) integer
D) String
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
What should you use to declare a variable that cannot be changed?

A) local
B) final
C) temp
D) static
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Any method that is not declared void must contain a return statement with a corresponding return value.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
When you add a new class that extends a base class, the method stubs that need implementation are auto-generated.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
The GridView control, while very useful for displaying images, cannot be customized.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
What is the first GridView control in a project named by default?

A) control1
B) defaultGallery
C) gridView1
D) theGallery
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following variable types can be accessed from multiple methods throughout an application?

A) Static
B) Class-level
C) Local-level
D) Temporary
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
If you wish, you can scale grid images to the full size of the screen.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
What is used to identify each element in an array?

A) counter
B) index
C) position
D) reference
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
The position argument in the OnItemClick method is a numeric value that holds which quadrant of the screen an item can be found.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following terms defines a rectangular area of the screen that displays an image or text object.

A) Expanse container
B) Layout container
C) Space container
D) View container
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
The GridView control is the only control that monitors for tap or click events.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
A View represents a piece of the screen area that displays an object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The length of an array is one more than the maximum subscript number.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
What category of the Palette does the control GridView sit in?

A) Images category
B) Composite category
C) Media category
D) Viewing category
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Which method provides a number of arguments to its registered listeners?

A) tapped method
B) clicked method
C) onTap method
D) onItemClick method
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
The code to reference an image called panda . P n g is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Which is a common aspect ratio?

A) 4:3
B) 3:4
C) 16:8
D) 10:6
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Where do you specify a method's return type?

A) in its body
B) in its declaration
C) in its last line
D) in its name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
When the ImageAdapter class is called, which method determines how many pictures should be displayed in the GridView control?

A) count() method
B) getCount() method
C) getNumber() method
D) getSize() method
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
Which of the following terms best describes the fractional relation of the width of an image compared with its height?

A) aspect ratio
B) framing ratio
C) scaling ratio
D) x-to-y ratio
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Which attribute in XML code can be used to place an image on the surface of a Button control?

A) a ndroid:image
B) image:src
C) image:path
D) android:src
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following is the scaling option that scales an image to fit the View type?

A) ImageView.ScaleType. CENTER
B) ImageView.ScaleType. CENTER_CROP
C) ImageView.ScaleType. FIT_SIZE
D) ImageView.ScaleType. FIT_XY
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Which of the following variables is used to load and access resources for the application?

A) App variable
B) Context variable
C) Program variable
D) System variable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The method to set an image to an ImageView control is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
What is used to initialize the instance variables of an object?

A) reference
B) class
C) constructor
D) method
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
In Android programs, you can place the ____________________ method in another method that is triggered only when the user touches the GridView control.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
What is the return type of a method that returns nothing?

A) double
B) int
C) null
D) void
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Which argument of the onItemClick method determines the row of the selected item?

A) id
B) view
C) position
D) parent
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Which statement do you place at the end of a method if the method sends a value to the statement that called it?

A) public
B) default
C) return
D) case
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
Which argument of the onItemClick method holds the value of the array element in the View adapter?

A) parent
B) view
C) position
D) id
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Which of the following is true about toast notifications?

A) They never receive focus
B) They are of fixed duration
C) They are limited to twenty characters
D) They message cannot contain a variable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
The ____________________ method provides the data model for the GridView layout.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Which scaling option does not scale or change the aspect ratio of an image?

A) ImageView.ScaleType. CENTER
B) ImageView.ScaleType. CENTER_CROP
C) ImageView.ScaleType. FIT_SIZE
D) ImageView.ScaleType. FIT_XY
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Using a(n) __________________ control, users can quickly scroll through a listing of thumbnail-sized pictures.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
A(n) ____________ container can include layouts such as GridView, RadioGroup, and ListView.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The ______________________ ScaleType option centers the image within the View type and scales it uniformly.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
The code to resize an image variable pic to 275x200 is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) ____________________ is a series of statements that perform some repeated task.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
The most powerful method in the ImageAdapter class is the ____________________ method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
The code to find the size of an array called fruit is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
________________ can change the displayed size of an image and keeps or changes the aspect ratio of the image within the ImageView control.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
To use a toast message within an onItemClick method, you must replace MainActivity.this with a Context class called _________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
The method to scale an ImageView a certain way is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
A(n) ____________________ is used to initialize the instance variables of an object.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.