Deck 5: Doodlz App

ملء الشاشة (f)
exit full mode
سؤال
A ________ is used to register listeners for accelerometer events.

A) AccelerometerManager
B) ListenerManager
C) SensorProcessor
D) SensorManager
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Android Studio uses the ________ build system to compile your code into an APK file-the installable app. This system also handles project dependencies, such as including in the build process any libraries used by the app.

A) Buck
B) Maven
C) Bazel
D) Gradle
سؤال
Class ________ provides a user interface for selecting a printer, has a method for determining whether a given device supports printing and provides a method for printing a Bitmap.

A) Printer
B) PrinterUI
C) PrintHelper
D) None of the above
سؤال
Google's material design specification indicates that a Button's text should ________.

A) use all lowercase letters
B) use all capital letters (e.g., CANCEL or SET COLOR) for languages that support them
C) use initial uppercase letters
D) None of the above
سؤال
Most devices have a(n) ________ for detecting device movement.

A) accelerator
B) speed sensor
C) accelerometer
D) None of the above.
سؤال
Android requires the user’s permission to allow an app to save files. In Android 6.0, the app ________.

A) prompts the user at installation time with a complete list of permissions the app requires.
B) prompts the user at installation time and execution time with a complete list of permissions the app requires.
C) requests each permission individually at execution time, only when the per-mission is required to perform a given task for the first time.
D) None of the above.
سؤال
A Fragment can place items in the app’s app bar and options menu. To do so, the Fragment must call its ________ method with the argument true.

A) setHasOptionsMenu
B) setOptionsMenu
C) setMenu
D) setHasMenu
سؤال
In addition to standard touch-event handling, Android 6.0 provides enhanced support for using a(n) ________ stylus with apps, including access to pressure data and which stylus button the user presses.

A) Wi-Fi
B) Bluetooth
C) NFC
D) Ethernet
سؤال
Each drawing method in class Canvas uses an object of class ________ (package android.graphics) to specify drawing characteristics, including color, line thickness, font size and more.

A) Draw
B) Characteristics
C) Settings
D) Paint
سؤال
Accelerometer information is delivered to the app as ________ values.

A) double
B) String
C) float
D) int
سؤال
You override SensorEventListener method ________ to process accelerometer events. This method should handle sensor events quickly or to copy the event data because the array of sensor values is reused for each sensor event.

A) sensorChanged
B) onSensorEvent
C) onSensorChanged
D) None of the above
سؤال
We use each menu item’s ________ property to specify that the menu item should be displayed on the app bar if there is room.

A) showAsAction
B) showOnActionBar
C) showIfRoom
D) None of the above
سؤال
Which of the following statements is false?

A) A Fragment’s lifecycle is tied to that of its parent Activity.
B) There are six Activity lifecycle methods that have corresponding Fragment lifecycle methods—onCreate, onStart, onResume, onPause, onStop and onDestroy.
C) When the system calls life cycle methods on an Activity, it will also call the corresponding methods (and potentially other Fragment lifecycle methods) on all of the Activity’s attached Fragments.
D) An Activity’s onResume method is called when a Fragment is on the screen and ready for the user to interact with it.
سؤال
A ________ object (package android-.graphics) represents line segments and curves.

A) Segment
B) Line
C) Path
D) Curve
سؤال
Which of the following statements is false?

A) When an Activity hosts Fragments and the Activity is resumed, all of its Fragments' onResume methods are called.
B) An Activity's onPause method is called when another Activity receives the focus, which pauses the one that loses the focus and sends it to the background.
C) When an Activity hosts Fragments and the Activity is paused, all of its Fragments' onPause methods are called.
D) When an app is paused, it should ensure that listeners for sensor events are still active.
سؤال
You use class SensorManager's ________ method to stop listening for accelerometer events.

A) reset
B) unregisterListener
C) stopListening
D) None of the above
سؤال
In addition to using Android 6.0’s new permissions model in which the app asks the user to grant permissions dynamically, each app also must specify any permissions it uses in ________.

A) class MainActivity
B) strings.xml
C) permissions.xml
D) AndroidManifest.xml
سؤال
A(n) ________ (package android-.content) enables the app to read data from and store data on a device.

A) Content-Resolver
B) Resolver
C) ContentAccessor
D) None of the above
سؤال
Colors are defined using the ARGB color scheme in which the ________ (i.e., transparency), red, green and blue components, respectively, are specified by integers in the range 0–255.

A) transparency
B) translucency
C) alpha
D) None of the above.
سؤال
Which of the following statements is false?

A) Android requires the permission an-droid.permission.WRITE_EXTERNAL_PERMISSION before an app can write to external storage.
B) Before Android 6.0, a user was required at start time to grant in advance all permissions that an app would ever need—this caused many people not to in-stall certain apps.
C) With the new permissions model, the app is installed without asking for any permissions. Instead, the user is asked to grant a permission only the first time the corresponding feature is used.
D) Once the user grants a permission, the app has that permission until the app is reinstalled or the user changes the app’s permissions via the Android Settings app.
سؤال
Call inherited View method ________ to indicate that the View needs to be redrawn.

A) redraw
B) repaint
C) update
D) invalidate
سؤال
If a Path already exists for the given ID, we call Path's ________ method to clear any existing points so we can reuse the Path for a new stroke.

A) erase
B) clear
C) reset
D) reuse
سؤال
Which of the following statements is false?

A) The system MotionEvent passed from onTouchEvent contains touch infor-mation for multiple moves on the screen if they occur at the same time.
B) MotionEvent method getPointerCount returns the number of touches the Motion-Event describes.
C) MotionEvent-’s getX and getY methods to get the last coordinates for a drag event.
D) MotionEvents are not generated when the user holds a finger motionless on the screen.
سؤال
Method ________ is called when the position of a SeekBar's thumb changes.

A) onSeekBarChanged
B) onThumbPositionChanged
C) onValueChanged
D) onProgressChanged
سؤال
PrintHelper.SCALE_MODE_FIT indicates that ________.

A) the PrintHelper dialog should be scalled to fit on the screen
B) the image should be scaled to fit in the PrintHelper dialog
C) the image should fit within the printable area of the paper
D) None of the above
سؤال
Path's ________ method clears the Path's data.

A) restart
B) reset
C) reinitialize
D) clear
سؤال
In apps that support both portrait and landscape orientations, onSizeChanged is called each time the user rotates the device. This could result in a new Bitmap each time the method is called. When replacing a Bitmap, you should call the prior Bitmap’s ________ method to release its resources.

A) reuse
B) recycle-
C) release
D) discard
سؤال
Which of the following statements is false?

A) When an app's Fragments interact with one another directly, we call this a loosely coupled approach.
B) Generally, a parent Activity manages an app's Fragment interactions.
C) To pass data to a Fragment, the Activity provides a Bundle of arguments.
D) Each Fragment class typically provides an interface of callback methods that its Activity implements. When the Fragment needs to notify its parent Activity of a state change, the Fragment calls the appropriate callback method.
سؤال
When a View needs to be redrawn, its ________ method is called.

A) onUpdateRequred
B) onDraw
C) onPaint
D) None of the above
سؤال
When a Fragment is removed from a parent Activity, method ________ is called.

A) onDestruct
B) onRemove
C) onDisconnect
D) onDetach
سؤال
Passing true to Paint's ________ method enables smoothing the edges of the lines.

A) setSmoothing
B) setHigherResolution
C) setAntiAlias
D) None of the above
سؤال
When the user selects a Fragment's menu item, Fragment method ________ responds to the selection.

A) onItemSelected
B) onMenuItemSelected
C) onOptionsItemSelected
D) onMenuSelected
سؤال
If an app does not have a needed permission (such as android.permission.WRITE_EXTERNAL_STORAGE), use the built-in ________ method to determine whether an explanation of why the app needs this permission should be displayed.

A) shouldShowRationale
B) shouldShowPermissionRationale
C) shouldShowRequestRationale
D) shouldShowRequestPermissionRationale
سؤال
SeekBar's ________ method positions the SeekBar's thumb.

A) setPosition
B) setProgress
C) setValue
D) setThumb
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/34
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Doodlz App
1
A ________ is used to register listeners for accelerometer events.

A) AccelerometerManager
B) ListenerManager
C) SensorProcessor
D) SensorManager
SensorManager
2
Android Studio uses the ________ build system to compile your code into an APK file-the installable app. This system also handles project dependencies, such as including in the build process any libraries used by the app.

A) Buck
B) Maven
C) Bazel
D) Gradle
D
3
Class ________ provides a user interface for selecting a printer, has a method for determining whether a given device supports printing and provides a method for printing a Bitmap.

A) Printer
B) PrinterUI
C) PrintHelper
D) None of the above
C
4
Google's material design specification indicates that a Button's text should ________.

A) use all lowercase letters
B) use all capital letters (e.g., CANCEL or SET COLOR) for languages that support them
C) use initial uppercase letters
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
5
Most devices have a(n) ________ for detecting device movement.

A) accelerator
B) speed sensor
C) accelerometer
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
6
Android requires the user’s permission to allow an app to save files. In Android 6.0, the app ________.

A) prompts the user at installation time with a complete list of permissions the app requires.
B) prompts the user at installation time and execution time with a complete list of permissions the app requires.
C) requests each permission individually at execution time, only when the per-mission is required to perform a given task for the first time.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
7
A Fragment can place items in the app’s app bar and options menu. To do so, the Fragment must call its ________ method with the argument true.

A) setHasOptionsMenu
B) setOptionsMenu
C) setMenu
D) setHasMenu
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
8
In addition to standard touch-event handling, Android 6.0 provides enhanced support for using a(n) ________ stylus with apps, including access to pressure data and which stylus button the user presses.

A) Wi-Fi
B) Bluetooth
C) NFC
D) Ethernet
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
9
Each drawing method in class Canvas uses an object of class ________ (package android.graphics) to specify drawing characteristics, including color, line thickness, font size and more.

A) Draw
B) Characteristics
C) Settings
D) Paint
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
10
Accelerometer information is delivered to the app as ________ values.

A) double
B) String
C) float
D) int
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
11
You override SensorEventListener method ________ to process accelerometer events. This method should handle sensor events quickly or to copy the event data because the array of sensor values is reused for each sensor event.

A) sensorChanged
B) onSensorEvent
C) onSensorChanged
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
12
We use each menu item’s ________ property to specify that the menu item should be displayed on the app bar if there is room.

A) showAsAction
B) showOnActionBar
C) showIfRoom
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which of the following statements is false?

A) A Fragment’s lifecycle is tied to that of its parent Activity.
B) There are six Activity lifecycle methods that have corresponding Fragment lifecycle methods—onCreate, onStart, onResume, onPause, onStop and onDestroy.
C) When the system calls life cycle methods on an Activity, it will also call the corresponding methods (and potentially other Fragment lifecycle methods) on all of the Activity’s attached Fragments.
D) An Activity’s onResume method is called when a Fragment is on the screen and ready for the user to interact with it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
14
A ________ object (package android-.graphics) represents line segments and curves.

A) Segment
B) Line
C) Path
D) Curve
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of the following statements is false?

A) When an Activity hosts Fragments and the Activity is resumed, all of its Fragments' onResume methods are called.
B) An Activity's onPause method is called when another Activity receives the focus, which pauses the one that loses the focus and sends it to the background.
C) When an Activity hosts Fragments and the Activity is paused, all of its Fragments' onPause methods are called.
D) When an app is paused, it should ensure that listeners for sensor events are still active.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
16
You use class SensorManager's ________ method to stop listening for accelerometer events.

A) reset
B) unregisterListener
C) stopListening
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
17
In addition to using Android 6.0’s new permissions model in which the app asks the user to grant permissions dynamically, each app also must specify any permissions it uses in ________.

A) class MainActivity
B) strings.xml
C) permissions.xml
D) AndroidManifest.xml
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
18
A(n) ________ (package android-.content) enables the app to read data from and store data on a device.

A) Content-Resolver
B) Resolver
C) ContentAccessor
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
19
Colors are defined using the ARGB color scheme in which the ________ (i.e., transparency), red, green and blue components, respectively, are specified by integers in the range 0–255.

A) transparency
B) translucency
C) alpha
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
20
Which of the following statements is false?

A) Android requires the permission an-droid.permission.WRITE_EXTERNAL_PERMISSION before an app can write to external storage.
B) Before Android 6.0, a user was required at start time to grant in advance all permissions that an app would ever need—this caused many people not to in-stall certain apps.
C) With the new permissions model, the app is installed without asking for any permissions. Instead, the user is asked to grant a permission only the first time the corresponding feature is used.
D) Once the user grants a permission, the app has that permission until the app is reinstalled or the user changes the app’s permissions via the Android Settings app.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
21
Call inherited View method ________ to indicate that the View needs to be redrawn.

A) redraw
B) repaint
C) update
D) invalidate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
22
If a Path already exists for the given ID, we call Path's ________ method to clear any existing points so we can reuse the Path for a new stroke.

A) erase
B) clear
C) reset
D) reuse
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following statements is false?

A) The system MotionEvent passed from onTouchEvent contains touch infor-mation for multiple moves on the screen if they occur at the same time.
B) MotionEvent method getPointerCount returns the number of touches the Motion-Event describes.
C) MotionEvent-’s getX and getY methods to get the last coordinates for a drag event.
D) MotionEvents are not generated when the user holds a finger motionless on the screen.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
24
Method ________ is called when the position of a SeekBar's thumb changes.

A) onSeekBarChanged
B) onThumbPositionChanged
C) onValueChanged
D) onProgressChanged
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
25
PrintHelper.SCALE_MODE_FIT indicates that ________.

A) the PrintHelper dialog should be scalled to fit on the screen
B) the image should be scaled to fit in the PrintHelper dialog
C) the image should fit within the printable area of the paper
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
26
Path's ________ method clears the Path's data.

A) restart
B) reset
C) reinitialize
D) clear
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
27
In apps that support both portrait and landscape orientations, onSizeChanged is called each time the user rotates the device. This could result in a new Bitmap each time the method is called. When replacing a Bitmap, you should call the prior Bitmap’s ________ method to release its resources.

A) reuse
B) recycle-
C) release
D) discard
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
28
Which of the following statements is false?

A) When an app's Fragments interact with one another directly, we call this a loosely coupled approach.
B) Generally, a parent Activity manages an app's Fragment interactions.
C) To pass data to a Fragment, the Activity provides a Bundle of arguments.
D) Each Fragment class typically provides an interface of callback methods that its Activity implements. When the Fragment needs to notify its parent Activity of a state change, the Fragment calls the appropriate callback method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
29
When a View needs to be redrawn, its ________ method is called.

A) onUpdateRequred
B) onDraw
C) onPaint
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
30
When a Fragment is removed from a parent Activity, method ________ is called.

A) onDestruct
B) onRemove
C) onDisconnect
D) onDetach
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
31
Passing true to Paint's ________ method enables smoothing the edges of the lines.

A) setSmoothing
B) setHigherResolution
C) setAntiAlias
D) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
32
When the user selects a Fragment's menu item, Fragment method ________ responds to the selection.

A) onItemSelected
B) onMenuItemSelected
C) onOptionsItemSelected
D) onMenuSelected
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
33
If an app does not have a needed permission (such as android.permission.WRITE_EXTERNAL_STORAGE), use the built-in ________ method to determine whether an explanation of why the app needs this permission should be displayed.

A) shouldShowRationale
B) shouldShowPermissionRationale
C) shouldShowRequestRationale
D) shouldShowRequestPermissionRationale
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
34
SeekBar's ________ method positions the SeekBar's thumb.

A) setPosition
B) setProgress
C) setValue
D) setThumb
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.