Filters
Question type

Study Flashcards

When a View is inflated, its constructor is called with a Context and a(n) ________ as arguments.


A) SetOfAttributes
B) Attributes
C) OptionsSet
D) AttributeSet

Correct Answer

verifed

verified

Methods getScreenWidth and getScreenHeight return the width and height of the screen, which are updated in the ________ method.


A) onOrientationChanged
B) onSizeChanged
C) onConfigurationChanged
D) None of the above

Correct Answer

verifed

verified

Method ________ of interface SurfaceHolder.Callback is called when the SurfaceView's size or orientation changes, and would typically be used to redisplay graphics based on those changes.


A) surfaceSizeChanged
B) surfaceOrientationChanged
C) onSizeChanged
D) surfaceChanged

Correct Answer

verifed

verified

There are seven sound streams identified by AudioManager constants. The mu-sic stream ________ is recommended for sound in games, because this stream’s volume can be controlled via the device’s buttons.


A) AudioManager.STREAM
B) AudioManager.MUSIC
C) AudioManager.STREAM_MUSIC
D) AudioManager.SYMPHONY

Correct Answer

verifed

verified

To obtain the Canvas for drawing on the SurfaceView, call SurfaceHolder method ________.


A) getCanvas
B) createCanvas
C) newCanvas
D) lockCanvas

Correct Answer

verifed

verified

A Frame-Layout is designed to display one View, but can also be used to ________ views.


A) stack
B) nest
C) position
D) layer

Correct Answer

verifed

verified

Which of the following statements is false?


A) More complex games might play many sounds at the same time. SoundPool.Builder's setMaxStreams method takes an argument that represents the maximum number of simultaneous sound streams that can play at once.
B) A SparseIntArray maps integer keys to integer values. HashMap<Integer, Integer> is similar to-but more efficient than-a SparseIntArray for small numbers of key-value pairs.
C) Each sound ID can be used to play a sound (and later to return its resources to the system) .
D) SoundPool method load receives three arguments-the application's Context, a resource ID representing the sound file to load and the sound's priority.

Correct Answer

verifed

verified

Sounds are played using one of Android’s audio- ________ for alarms, music, notifications, phone rings, system sounds, phone calls and more.


A) streams
B) players
C) tools
D) None of the above

Correct Answer

verifed

verified

You can call Canvas's drawRect method to clear the Canvas. The method receives the rectangle's upper-left x-y coordinates, width and height, and the ________ object that specifies the drawing characteristics.


A) Draw
B) PaintSettings
C) Paint
D) DrawSettings

Correct Answer

verifed

verified

An app’s sound effects are managed with a(n) ________ (package an-droid.media) , which can be used to load, play and unload sounds.


A) Effects
B) SoundPool
C) EffectsPool
D) SoundManager

Correct Answer

verifed

verified

Showing 21 - 30 of 30

Related Exams

Show Answer