Deck 7: Reveal Displaying Pictures in a Gridview
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 7: Reveal Displaying Pictures in a Gridview
1
The ____ control displays items in a two-dimensional, scrollable grid.
A) Box
B) GridView
C) Swatch
D) Wallpaper
A) Box
B) GridView
C) Swatch
D) Wallpaper
B
2
The GridView control is a widget that sits in the ____ category of the palette.
A) Images
B) Composite
C) Media
D) Viewing
A) Images
B) Composite
C) Media
D) Viewing
B
3
You can only scroll in one direction using a GridView control.
False
4
When you add a new class that extends a base class, the methods that need implementation are auto-generated.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
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
6
Images are a powerful marketing tool by adding visual appeal to your application.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Arrays provide access to data by using a numeric ____ to identify each element in the array.
A) counter
B) index
C) position
D) threshold
A) counter
B) index
C) position
D) threshold
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
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
9
____ variables can be accessed from anywhere within the Java class in which they are declared.
A) Automatic
B) Class-level
C) Local-level
D) Temporary
A) Automatic
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
10
Typically, a(n) ____ is used to assign values to a GridView control that has multiple items.
A) array
B) boolean
C) integer
D) String
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
11
If you provide different resolutions of images to the Android system, you will have to manually select the correct resolution for a given system.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
A(n) ____ container is a rectangular area of the screen that displays an image or text object.
A) Expanse
B) Layout
C) Space
D) View
A) Expanse
B) Layout
C) Space
D) View
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
The GridView control is the only control that monitors for click events.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
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
15
If you want to use a Toast notification in an Activity that is the main Activity, you should use the Main.this reference as the correct Context.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
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
17
Using controls such as the GridView and Spinner, a(n) ____ binds specific types of data and displays that data in a particular layout.
A) adapter
B) context
C) editor
D) view
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
18
Typically you add an ImageView control by dragging the control onto the ____.
A) emulator
B) View
C) Palette
D) XML code
A) emulator
B) View
C) Palette
D) XML code
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
The ____ layout tool shows items in a center-locked, horizontally scrolling list.
A) GridView
B) ImageViewer
C) MediaPlayer
D) TextView
A) GridView
B) ImageViewer
C) MediaPlayer
D) TextView
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
The first GridView control in a project is named ____ by default.
A) control1
B) defaultGallery
C) gridView1
D) theGallery
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
21
Users can quickly scroll the image grid by ____________________ their fingers.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
A(n) ____ variable is used to load and access resources for the application.
A) App
B) Context
C) Program
D) System
A) App
B) Context
C) Program
D) System
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
The ____ statement returns the value from a method.
A) if
B) for
C) return
D) while
A) if
B) for
C) return
D) while
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
In the onItemClick method, the variable that holds the position of the View in the Adapter is ____ argument.
A) first
B) second
C) third
D) fourth
A) first
B) second
C) third
D) fourth
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
In the onItemClick method, the variable that holds the actual View that was selected is the ____ argument.
A) first
B) second
C) third
D) fourth
A) first
B) second
C) third
D) fourth
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
The return type of a method that returns nothing is ____.
A) double
B) int
C) String
D) void
A) double
B) int
C) String
D) void
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
The code to reference an image called panda. p ng is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
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
29
You declare a method's return type in its ____ .
A) body
B) declaration
C) last line
D) name
A) body
B) declaration
C) last line
D) name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The scaling option that scales an image to fit the View type is ImageView.ScaleType. ____.
A) CENTER
B) CENTER_CROP
C) FIT_SIZE
D) FIT_XY
A) CENTER
B) CENTER_CROP
C) FIT_SIZE
D) FIT_XY
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
The ____ is 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
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
32
The scaling option that does not change the aspect ratio of an image is ImageView.ScaleType. ____.
A) CENTER
B) CENTER_CROP
C) FIT_SIZE
D) FIT_XY
A) CENTER
B) CENTER_CROP
C) FIT_SIZE
D) FIT_XY
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
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
34
The last argument to the onItemClick method determines the row id of the selected item, which is most useful for a ____.
A) GridView
B) ListView
C) Spinner
D) TextView
A) GridView
B) ListView
C) Spinner
D) TextView
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
When the ImageAdapter class is called, the ____ method determines how many pictures should be displayed in the GridView control.
A) count()
B) getCount()
C) getNumber()
D) getSize()
A) count()
B) getCount()
C) getNumber()
D) getSize()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
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
37
The Toast class is part of the android. ____ package.
A) context
B) controls
C) layout
D) widget
A) context
B) controls
C) layout
D) widget
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
The ____ method provides a number of arguments to its registered listeners.
A) beenClicked
B) clicked
C) onClick
D) onItemClick
A) beenClicked
B) clicked
C) onClick
D) onItemClick
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
A(n) ____ return type indicates that the return type of a method is an integer.
A) char
B) double
C) int
D) number
A) char
B) double
C) int
D) number
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
A common aspect ratio is ____.
A) 4:3
B) 3:4
C) 16:8
D) 10:6
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
41
Keeping the ____________________ means that an image is not distorted from its original ratio of width to height .
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The code to find the size of an array called bananas is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
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
44
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
45
The code to return the length of a String variable called butter is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
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
47
The Context class is in the ____________________ package.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
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
49
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
50
To set an image on the surface of a Button control, you can set the ____________________ attribute in the XML code.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck