Book Title
Android How to Program 2nd Edition

CMCS 48329

July 17, 2017
(True/False) Generally, each EditText should have a descriptive TextView that helps the
user understand the EditText's purpose (also helpful for accessibility)otherwise,
Android Lint issues a warning.
You implement interfaceAdapterView.OnItemClickListener to respond when the user
touches an item in a ListView.
(True/False) Fragment lifecycle method onStop is called after onPause when the
Fragment is no longer visible to the user.
(True/False) By default, the IDE sets the Padding Left and Padding Right properties to
@dimen/activity_horizontal_margina predefined dimension resource in the dimens.xml
file of the project's res/values folder. This resource's value is 16dp, so there will be a
16dp space to the left and right of the GridLayout. The IDE created this resource when
you created the app's project.
(True/False) All of an app's Fragments must use the same layout.
According to the app discovery site AppBrain, the average price for puzzle game apps
is several times greater than that for business apps.
(True/False) The Palette's Text Fields section provides many preconfigured EditTexts
for various forms of input (e.g., numbers, times, dates, addresses and phone numbers).
When the user interacts with an EditText, an appropriate keyboard is displayed based on
the EditText's input type.
(True/False) To ensure app quality, Google Play has a strict approval process for
uploading apps.
(True/False) SparseIntArray is similar tobut less efficient thana HashMap<Integer,
Integer> for small numbers of key"value pairs.
(True/False) In most cases, you"ll need to manipulate the XML layout markup directly.
(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.
(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).
(True/False) The Graphical Layout editor comes with many device configurations that
represent various screen sizes and resolutions that you can use to design your GUI. If,
for example, you choose a predefined Nexus 4 device configuration, your app can run
only on a Nexus 4 device.
(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.
(True/False) Google sells your apps for 99 cents on Google Play.
(True/False) When you call the AsyncTask's execute method, doInBackground performs
the task in the GUI thread.
(True/False) You want to ensure that the game operates at the same speed regardless of
how fast the device is. If the time between frames is larger (i.e., the device is slower),
the game elements should move less when each frame of the animation is displayed. If
the time between frames is smaller (i.e., the device is faster), the game elements should
move further when each frame of the animation is displayed.
(True/False) By default TextViews do not have a border.
(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.
(True/False) You can build some apps without directly manipulating the XML stored in
the files of the project's res folder.
(True/False) In general, most apps should support either portrait or landscape
orientations, but not both.
(True/False) Intents can be used to launch other activities in the same app or in other
(True/False) One problem with using a shake event is that even unintentional small
movements always result in events.
(True/False) SQLite does not support inserting a completely empty row into a database
(True/False) Android apps must be created with an IDE.
(True/False) Font sizes should be specified in scale-independent pixels (sp) so that fonts
in your app can also be scaled by the user's preferred font size (as specified in the
device's settings).
(True/False) The qualifiers large and land ensure that any layouts defined in a particular
folder will be used only on large devices on which the app is running in landscape
(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.
(True/False) You typically provide images and other visual resources in the highest
available resolution so Android can scale each appropriately for each particular device's
pixel density.
(True/False) Method onCreateView is called after a Fragment's onCreate method to
build and return a View containing the Fragment's GUI. Method onActivityCreated is
called after the Fragment's host Activity is created.
(True/False) Extensive input/output operations, such as loading data from files and
databases should be performed on the UI thread.
(True/False) For apps that run on both phones and tablets, Android requires that you
provide only a single layout which it scales to each size device.
(True/False) You process touch events by overriding the View method on Touch Event.
(True/False) Android runs on a wide variety of devices that have different screen sizes
and resolutions. To ensure that your images look good on all devices, you should
provide several versions of each image your app uses. Android can automatically
choose the correct image based on various specifications, such as the screen's resolution
(width and height in pixels) or DPI.
(True/False) Class SQLite-OpenHelper also provides the onDowngrademethod that can
be used to downgrade a database when the currently stored version has a higher version
number than the one requested in the call to class SQLite-OpenHelper's constructor.
(True/False) A key benefit of defining your string values as string resources is that you
can easily localize your app by creating additional XML resource files for those string
resources in other languages. In each file, you translate the string-resource names and
strings. Android can then choose the appropriate resource file based on the device user's
preferred language.
(True/False) With each new API level, there have typically been new GUI features. The
Graphical Layout editor window shows only features that are available in the selected
API level of the canvas confuration options.
(True/False) When an app first executes, overridden Activity lifecycle method onStart is
before after onCreate.
(True/False) The onCreate method is called by the system when the app loads; if the
app's process was killed by the operating system while the app was in the background,
and the app is then restored; and each time the configuration changes, such as when the
user rotates the device or opens or closes a physical keyboard.
(True/False) Once you"ve tested and debugged your app on the emulator, it's ready to
be posted Google Play.
Once you"ve created the icon and label, you"ll need to specify them in the app's
________ file by setting the android:icon and android:label attributes of the application
Q: The process of building an object of a class before a program can perform the tasks
that the class's methods define is called instantiation. A class is then referred to as an
instance of its object.
Providing hints for Android TalkBack in your EditTexts makes your app more
When an app is launched, Android creates a main thread called the ________ which
handles all of the GUI interactions. All GUI processing must be performed in this
In addition to buttons, an AlertDialog can display a list of items in a ________.
The Google Play Developer Console provides support for alpha and beta testing apps
with groups of people through the ________ social network.
Your most important app brand asset is the app ________.
The ________ (DDMS), which is installed with the ADT Plugin for Eclipse and helps
you debug your apps running on actual devices, also enables you to capture screenshots
on your device.
Call Path's ________ method to set the Path's starting coordinates and specify the new
Point's x and y values.
Before running an app in the emulator, you"ll need to create a(n) ________, which
defines the characteristics of the device on which you want to test, including the
hardware, system image, screen size, data storage and more.
Most Android devices have a(n) ________ that allows apps to detect movement.
By default, theGUI layout for a Blank App is stored in an XML file called________,
located in the project's res folder in the layout subfolder.
You can pass arguments to a Fragment by placing them in a ________ of key"value
Typically, each Fragment defines an interface of ________ that are implemented in the
host Activity.
The Android documentation for class SoundPool recommends using the stream for
playing music (________) for sound in games.

Subscribe Now

Sign up to view full document

View Document