Accounting
Anthropology
Archaeology
Art History
Banking
Biology & Life Science
Business
Business Communication
Business Development
Business Ethics
Business Law
Chemistry
Communication
Computer Science
Counseling
Criminal Law
Curriculum & Instruction
Design
Earth Science
Economic
Education
Engineering
Finance
History & Theory
Humanities
Human Resource
International Business
Investments & Securities
Journalism
Law
Management
Marketing
Medicine
Medicine & Health Science
Nursing
Philosophy
Physic
Psychology
Real Estate
Science
Social Science
Sociology
Special Education
Speech
Visual Arts
Programming Language
Q:
(True/False) SQLite does not support inserting a completely empty row into a database table.
Q:
(True/False) Once a database is opened successfully, it will be cached by the operating system to improve the performance of future database interactions.
Q:
(True/False) Database names must be unique across apps.
Q:
Which of the following statements is false?
a. Cursor method moveToFirst can be used to move the Cursor to the first row in the result set.
b. It's considered good practice to ensure that Cursor method moveToFirst returns true before attempting to get data from the Cursor.
c. Class Cursor provides method getColumnIndexOrThrow if you prefer to get an exception when the specified column name does not exist.
d. Android automatically releases resources like database connections when they are not being used so that other activities can use the resources.
Q:
Method onOptionsItemSelected uses the selected MenuItem's ________ to determine which one was selected.
Q:
(True/False) Fragment method onSaveInstanceState executes when the configuration of the device changes during the app's executionfor example, when the user rotates the device or slides out a keyboard on a device with a hard keyboard.
Q:
(True/False)You call CursorAdapter method changeCursor with the argument true to remove the Cursor from the CursorAdapter.
Q:
(True/False) Fragment lifecycle method onStop is called after onPause when the Fragment is no longer visible to the user.
Q:
(True/False) When you call the AsyncTask's execute method, doInBackground performs the task in the GUI thread.
Q:
(True/False) Each AsyncTask can be executed many times.
Q:
Which of the following statements is false?a. To display the Cursor's results in a ListView we create a new CursorAdapter object which exposes the Cursor's data in a manner that can be used by a ListView.b. SimpleCursorAdapter is a subclass of CursorAdapter that's designed to simplify mapping Cursor columns directly to TextViews or ImagesViews defined in your XML layouts.c. You must use standard layout resources for ListView items.d. You call inherited ListActivity method setListAdapter to bind a ListView to a CursorAdapter, so that the ListView can display the data.
Q:
You call ListView method ________ to indicate that only one item can be selected at a time.
Q:
You call Fragment method setRetainInstance with the argument true to indicate that a Fragment should be ________.
Q:
Call Fragment Transaction method ________ to push a Fragment onto the back stack. This allows the user to touch the back button to pop the Fragment from the back stack and allows Main Activity to programmatically pop the Fragment from the back stack.
Q:
You can pass arguments to a Fragment by placing them in a ________ of key"value pairs.
Q:
Call the FragmentManager's ________ method to remove the top Fragment on the back stack.
Q:
If the resource ID ________ exists in MainActivity's layout, then the app is running on a phone.
Q:
(True/False) You can configure a Fragment to be retained across configuration changes, such as when the user rotates the device.
Q:
(True/False) Class MainActivity manages the app's fragments and coordinates the interactions between them. On phones, MainActivity displays one master Fragment and one detail Fragment at a time.
Q:
(True/False) Each menu item's Order in category values determines the order in which the menu items appear on the action bar.
Q:
Which of the following EditTexts's Input Type property values might be used to ensure that state abbreviations are displayed in capital letters?a. textPersonName|textCapWordsb. textPostalAddress|textCapWordsc. textPostalAddress|textCapCharactersd. number
Q:
Each EditText specifies the Input Type and IME Options properties. For devices that display a soft keyboard, the Input Type specifies ________ when the user touches the corresponding EditText.
Q:
A ________ is a ViewGroup that can contain other Views (like a layout) and that lets users scroll through content too large to display on the screen.
Q:
(True/False) You must define Drawables in the project's drawable folders for all device sizes and resolutions to be used with your app.
Q:
(True/False) Like other resources, style resources are placed in the app's res/values folder. When you create a project, the IDE creates a styles.xml file containing predefined styles. Each new style you create specifies a name that's used to apply that style to GUI components and one or more items specifying property values to apply.
Q:
Why would you double click strings.xml in the res/values folder?
Q:
When we need a database operation's results in the GUI thread, we"ll use a subclass of ________ (package android.os) to perform the operation in one thread and receive the results in the GUI thread.
Q:
(True/False) You should perform long-running operations or operations that block execution until they complete (e.g., file and database access) in the GUI thread.
Q:
SQLite is one of the world's most widely deployed database engines. Database queries are performed with Structured Query Language (SQL) and query results are managed via a ________ (package android-.database).
Q:
(True/False) You can use a CursorAdapter (package android-.widget) to display the results of a database query in a List View.
Q:
(True/False) When a Fragment's primary task is to display a scrollable list of items, you can extend class ListFragment. A ListFragment uses a ListView as its default layout.
Q:
(True/False) By default TextViews do not have a border.
Q:
(True/False) You can define common GUI component attribute"value pairs as styleresources. You can then apply the styles to all components that share those values by using the style attribute. Any subsequent changes you make to a style are automatically applied to all GUI components.
Q:
(True/False) When an app is simply placed into the background, perhaps so the user can answer a phone call or when the user starts another app, the app must save the contents of its GUI components for when the app is brought back to the foreground (provided that the system does not kill the app).
Q:
Method ________ is called by the system when the configuration of the device changes during the app's executionfor example, when the user rotates the device or slides out a keyboard on a device with a hard keyboard. This method can be used to save state information that you"d like to restore when the app's onCreate method is called as part of the configuration change.
Q:
Typically, each Fragment defines an interface of ________ that are implemented in the host Activity.
Q:
(True/False) To communicate data between Fragments and a host Activity or the Activity's other Fragments, it's considered best practice to do so through the root Fragment.
Q:
You"ll use Android's ________a data structure that stores Fragments in last-in-first-out (LIFO) order-to provide automatic support for the Android system bar's back button and to allow the app to remove Fragments in the reverse order from which they were added.
Q:
Which of the following statements is false?
a. You can declare each Fragment in an Activity's layout or, for a DialogFragment, call its show method to create it.
b. An app can use multiple activities to host an app's Fragments on a phone device.
c. You can use only one Activity to host all of an app's Fragments.
d. On a phone-sized device, you"ll typically display several Fragments at a time.
Q:
Method onProgressChanged is called when the position of a SeekBar's ________ changes.
Q:
When the ColorDialogFragment is added to a parent Activity, method ________ is called.
Q:
Color's static methods alpha-, red, green and blue extract the ARGB values from the color, and SeekBar's ________ method positions the thumbs.
Q:
PrintHelper method printBitmap displays Android's print dialog, which allows the user to choose whether to save the image as a ________ on the device or to print the image to an available printer.
Q:
(True/False) Store the image in the device's Gallery by calling class MediaStore.Images.Media's insertImage method. Method insertImage returns a String representing the image's location on the device, or null if the image could not be saved.
Q:
(True/False) The system MotionEvent passed from onTouchEvent contains touch information for multiple moves on the screen if they occur at the same time. MotionEvent method getPointerCount returns the number of touches the Motion-Event describes.
Q:
Call Path's ________ method to set the Path's starting coordinates and specify the new Point's x and y values.
Q:
Which of the following statements is false?a. Motion-Event's getActionMaskedmethod returns an int representing the MotionEvent type, which you can use with constants from class MotionEvent to determine how to handle each event.b. Motion-Event's getActionIndex method returns an integer index representing which finger caused the event. This index is the finger's unique ID.c. To get the finger's unique ID that persists across MotionEvents until the user removes that finger from the screen, we"ll use Motion-Event's getPointerID method, passing the finger index as an argument.d. If the action is MotionEvent.ACTION_DOWN or Motion Event.ACTION_POINTER_DOWN, the user touched the screen with a new finger.
Q:
Which of the following statements is false?
a. Method onTouchEvent is called when the View receives a touch event.
b. Android supports multitouchthat is, having multiple fingers touching the screen.
c. The user must maintain the same number of fingers touching the screen for the duration of the multitouch event.
d. Each fingerknown as a pointerhas a unique ID that identifies it across touch events.
Q:
SimpleOn-Gesture-Listener is an ________ class that implements interfaces On Gesture Listener and On Double Tap-Listener.
Q:
When a View needs to be redrawn, its onDraw method is called. The first argument is the Bitmap to draw, the next two arguments are the x-y coordinates where the upper-left corner of the Bitmap should be placed on the View and the last argument is the ________ object that specifies the drawing characteristics.
Q:
Why would you call the inherited View method invalidate?
Q:
Which of the following statements is false?a. Bitmap's static createBitmap method creates a Bitmap of the specified width and height.b. The last argument to createBitmap is the Bitmap's encoding, which specifies how each pixel in the Bitmap is stored. The constant Bitmap.Config.ARGB_8888 indicates that each pixel's color has a default value of 8 for the alpha, red, green and blue components.c. A Canvas is used to draw shapes directly to a Bitmap.d. You can use Bitmap's eraseColor method to fill the Bitmap with white pixels.
Q:
Why would you call Paint's setStrokeCap method with Paint.Cap.ROUND?
Q:
(True/False) You set a line's width using Paint's setLineWidth method.
Q:
Why would you pass true to Paint's setAntiAlias method?
Q:
When processing a menu selection you use the MenuItem's ________ method to get the resource ID of the selected menu item, then take appropriate actions based on the selection.
Q:
(True/False) When the user selects a menu item, Fragment method on OptionsItemSelected responds to the selection.
Q:
It's important to handle sensor events quickly or to copy the event data because ________.
Q:
Why would you provide an empty body for a method?
Q:
We override SensorEventListener method ________ to process accelerometer events.
Q:
You register to receive accelerometer events using SensorManager's registerListener method. One of its arguments is the rate at which sensor events should be delivered to the app. Why would you specify SENSOR_DELAY_NORMAL to receive sensor events at the default rate, instead of choosing a faster rate?
Q:
SensorManager's GRAVITY_EARTH constant represents ________.
Q:
(True/False) Like an Activity, a Fragment can place items in the app's action bar and options menu. To do so, the Fragment must call its setHasOptionsMenu method with the argument true.
Q:
(True/False) One problem with using a shake event is that even unintentional small movements always result in events.
Q:
What does the following code do?
if (screenSize == Configuration.SCREENLAYOUT_SIZE_XLARGE)
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
else
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
Q:
The Android Support Library is a set of libraries that are commonly used to provide new Android features for use in older Android versions.
Q:
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.
Q:
The ________ manages media files (images, audio and video) stored on a device.
Q:
The default location in which photos taken with the device are stored is the device's ________.
Q:
(True/False) A GestureDetector allows an app to react to user interactions such as flings, single taps, double taps, long presses and scrolls by implementing the methods of interfaces GestureDetector.OnGestureListener and Gesture-Detector.On-Double-Tap-Listener interfaces.
Q:
Android's full-screen immersive mode enables an app to take advantage of the entire screen, but still allows the user to access the ________ when necessary.
Q:
You use the type of a ________ to determine whether the user has touched the screen, dragged across the screen or lifted a finger from the screen.
Q:
(True/False) You process touch events by overriding the View method on Touch Event.
Q:
(True/False) You can associate a Canvas with a Bitmap, then use the Canvas to draw on the Bitmap, which can then be displayed on the screen. A Bitmap can also be saved into a file.
Q:
The last Fragment lifecycle method called when a Fragment is about to be detached from a parent Activity is ________.
Q:
The first Fragment lifecycle method called when a Fragment is attached to a parent Activity is ________.
Q:
(True/False) Alert Dialogs are often created using anonymous inner classes that extend DialogFragment and display only text and buttons. AlertDialogs may also contain custom Views.
Q:
Most Android devices have a(n) ________ that allows apps to detect movement.
Q:
An ARGB color contains ________ (transparency), ________, ________ and ________ componnts.
Q:
With Android's ________ you can draw on the entire screenthe device's system bars and action bar toggle between displayed and hidden when you tap the screen.