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:
Which of the statements in a), b) and c) is false?
a. You can combine several fragments to create user interfaces that take advantage of tablet screen sizes.
b. You can easily interchange fragments to make your GUIs more dynamic.
c. Class SettingsFragment is a subclass of PreferenceFragment, which can automatically maintain an app's user preferences in a SharedPreferences file on the device.
d. All of the preceding statements are true.
Q:
A ________ typically represents a reusable portion of an Activity's user interface, but may also represent reusable program logic.
Q:
When the user selects a menu item, Activity method ________ responds to the selection.
Q:
The options menu is an object of class Menu. To specify Menu options, you override Activity's ________ method to add the options to the method's Menu argument.
Q:
(True/False) When an EditText receives the focus, its corresponding soft keyboard is displayed.
Q:
(True/False) When the first GUI component in the GUI is an EditText, Android gives that component the focus when the app loads.
Q:
All apps support ________ orientation(s) by default.
a. neither portrait nor landscape
b. only landscape
c. only portrait
d. both portrait and landscape
Q:
An Intent includes a Bundle of ________additional information that's passed to the Activity that handles the Intent. For example, an e-mail Activity can receive the e-mail's subject, CC and BCC addresses, and the body text.
Q:
In addition to buttons, an AlertDialog can display a list of items in a ________.
Q:
Any local variable or method parameter that will be used in an anonymous inner class must be declared ________.
Q:
Passing an Intent to the inherited Activity method startActivity starts an Activity that can perform the specified action on the given data. If we"ve specified to view a URI, the Intent launches the device's ________ to display the corresponding web page.
Q:
(True/False) Many constants are defined in the Intent class describing actions such as searching, choosing, sending and playing.
Q:
The first argument of Intent's constructor is ________.
Q:
(True/False) Intents can be used to launch other activities in the same app or in other apps.
Q:
The ? in AdapterView<?> is a ________ in Java generics indicating method onItemClick can receive an Adapter-View that displays any type of data.
Q:
To change a SharedPreferences object's contents, you must first call its edit method to obtain a(n) ________ object, which can add key"value pairs to, remove key"value- pairs from, and modify the value associated with a particular key in a SharedPreferences file.
Q:
You create the AlertDialog by calling the AlertDialog.Builder's create method and display the modal dialog by calling AlertDialog's ________ method.
Q:
(True/False) According to the Android design guidelines for dialogs, most dialogs need titles.
Q:
An AlertDialog.Builder object helps you configure and create an AlertDialog. The argument to the constructor is the ________ in which the dialog will be displayed.
Q:
Lengthy data access should not be done in the UI thread; otherwise, the app will display an ________ (ANR) dialog, typically after five seconds of preventing the user from interacting with the app.
Q:
(True/False) You use the method getSharedPreferences (inherited from class Context) to get a SharedPreferences object that can read existing tag"query pairs from an app's shared preferences. The first argument indicates the name of the file that contains the data. The second argument is a constant that specifies the accessibility of the filethese constants can be combined with the bitwise AND operator.
Q:
When you call setContentView and pass the constant R.layout.activity_main, Android ________the GUI from activity_main.xml.
Q:
(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.
Q:
When you create an app project, the IDE generates ________ as a subclass of Activity and provided the shell of an overridden onCreate method, which every Activity subclass must override.
Q:
You implement interfaceAdapterView.OnItemClickListener to respond when the user touches an item in a ListView.
Q:
Class ________ of package android.content is used to manipulate persistent key"value pairs that are stored in files associated with the app.
Q:
Class DialogInterface of package android.content contains the nested interface ________. We implement this interface, for example, to handle the events that occur when the user touches a button on an AlertDialog.
Q:
(True/False) If a list item should display multiple pieces of data, you"ll need a list-item layout that consists of multiple elements, and each element will need an android:id attribute.
Q:
The Android design guidelines specify that the minimum recommended size for a touchable item on the screen is ________.
Q:
(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.
Q:
The ________ editor's toolbar contains various buttons that enable you to preview the design for other screen sizes and orientations.
Q:
(True/False) @android:id/list is the required Id for the ListView in a ListActivity's custom layout.
Q:
It's considered a best practice in Android to ensure that every GUI component can be used with TalkBack. For components that don"t have descriptive text, such as an ImageButton, provide text for the component's ________ property.
Q:
(True/False) The Android design guidelines indicate that text displayed in your GUI should be brief, simple and friendly with the important words last.
Q:
Providing hints for Android TalkBack in your EditTexts makes your app more ________.
Q:
According to the Android design guidelines, ________dp is the recommended space between the edges of a device's touchable screen area and the app's content; however, many apps (such as games) use the full screen.
Q:
(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.
Q:
It's good practice to define all your literal strings values in the ________ file (located in the app's res/values folder).
Q:
Why would components in a layout not require Ids?
Q:
It's often easiest to select a particular GUI component in the _________ window.
Q:
(True/False) You create the AndroidManifest.xml file when you create an app.
Q:
(True/False) An AlertDialog that asks the user to register to gain access to additional features might provide a Remind Me Later buttonsuch a button represents a positive action.
Q:
(True/False) AlertDialogs can display buttons, checkboxes, radio buttons and lists of items that the user can touch to respond to the dialog's message.
Q:
You specify the settings for an AlertDialog with an ________ object, then use it to create the AlertDialog.
Q:
While a dialog is displayed, the user cannot interact with the appthis is known as a ________ dialog.
Q:
Which of the following statements is false?
a. With implicit Intents we allow Android to launch the most appropriate Activity based on the type of data.
b. If multiple activities can handle the action and data passed to startActivity, the system will display a dialog in which the user can select which Activity to use.
c. If the system cannot find an Activity to handle the action, then method startActivity throws an ActivityNotFoundException.
d. Explicit Intents indicate the precise set of activities to choose from.
Q:
The predefined action named ________ specifies that the Activity can be used to launch the app to begin its execution.
Q:
Which of the following statements is false?
a. Each Activity can specify intent filters indicating actions the Activity is capable of handling.
b. Intent filters are defined in the AndroidManifest.xml file.
c. An Intent is used to launch an Activityit indicates an action to be performed and the data on which to perform that action.
d. An intent is a GUI that shows a list of apps that can handle the specified Intent.
Q:
Android uses a technique known as ________ messaging to communicate information between activities within one app or activities in separate apps.
Q:
(True/False) Extensive input/output operations, such as loading data from files and databases should be performed on the UI thread.
Q:
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 thread.
Q:
(True/False) You can have one or more files containing key"value pairs associated with each appeach key enables you to quickly look up a corresponding value.
Q:
________ is a subclass of ImageView which provides additional capabilities that enable an image to be used like a Button object to initiate an action.
Q:
Which of the following statements is false?
a. A ListActivity's default GUI contains only a ListView that fills the screen's client area between Android's top and bottom system bars.
b. If a ListActivity's GUI requires only the default ListView, then you need to define a separate layout for your ListActivity subclass.
c. When customizing a ListActivity subclass's GUI, the layout must contain a ListView with its Id attribute set to "@android:id/list".
d. "@android:id/list" is the name that class ListActivity uses to reference its ListView.
Q:
Which of the following statements is false?
a. When an Activity's primary task is to display a scrollable list of items, you can extend class ListActivity, which uses a ListView that occupies the entire app as its default layout.
b. ListView is a subclass of Adaptera GUI component is bound to a data source via an Adapter object.
c. When use an ArrayAdapter to create an object that populates the ListView using data from an ArrayList collection object, this is known as data binding.
d. Several types of AdapterViews can be bound to data using an Adapter. You can bind database data to a ListView.
Q:
You can use a ListView to display a list of items that's ________ if the complete list cannot be displayed on the screen.
Q:
(True/False) Android makes it easy for you to share various types of information from an app via e-mail, instant messaging (SMS), Facebook, Google+, Twitter and more.
Q:
(True/False) You can support both portrait and landscape orientations by designing the GUI so that it can dynamically adjust GUI component sizes based on the current orientation.
Q:
(True/False) In general, most apps should support either portrait or landscape orientations, but not both.
Q:
(True/False) Java requires that you override every method in an interface that you implement.
Q:
You call a SeekBar's setOnSeekBarChangeListener method to register the OnSeekBarChangeListener that will respond to events generated when the user moves the customTipSeekBar's ________.
Q:
You call an EditText's addTextChangedListener method to register the TextChangedListener that will respond to events generated when the user ________.
Q:
Which of the following statements is false?
a. Once the layout is inflated, you can get references to the individual widgets so that you can interact with them programmatically.
b. Method findViewById takes an int constant representing a specific view's Id and returns the view.
c. The name of each view's R.id constant is determined by the component's Id property that you specified when designing the GUI.
d. As an example of c) amountEditText's constant is R.id.amountEditText.
Q:
A call to setContentView receives a constant that indicates which XML file represents an Activity's GUI. Method setContentView uses this constant to load the corresponding XML document, which is then parsed and converted into the app's GUI. This process is known as ________ the GUI.
Q:
Which of the following statements about the nested classes in class R is false?
a. class drawable contains constants for any drawable items, such as images, that you put in the various drawable folders in your app's res folder
b. class view contains constants for the views in your XML layout files
c. class layout contains constants that represent each layout file in your project (such as, activity_main.xml)
d. class string contains constants for each String in the strings.xml file.
Q:
As you build your app's GUI and add resources (such as strings in the strings.xml file or views in the activity_main.xml file) to your app, the IDE generates a class named ________ that contains nested classes representing each type of resource in your project's res folder.
Q:
(True/False) Calling the superclass's onCreate method is required when overriding onCreate.
Q:
Which of the following statements is false?a. The onCreate method is called by the system when an Activity is started.b. Method onCreate typically initializes the Activity's instance variables and views.c. Method onCreate should perform the bulk of the app's work.d. In fact, if the app takes longer than five seconds to load, the operating system will display an ANR (Application Not Responding) dialoggiving the user the option to forcibly terminate the app.
Q:
The NumberFormat objects are used to format currency values and percentages, respectively. NumberFormat static method getCurrencyInstance returns a NumberFormat object that formats values as currency using the device's ________.
Q:
Interface Editable of package android.text allows you to modify the content and markup of text in a GUI. You implement interface ________ of package android.text to respond to events when the user changes the text in an EditText.
Q:
Which of the following statements is false?
a. Class Bundle of package android.os represents an app's state information.
b. Android gives an app the opportunity to save its state before another app appears on the screen. This might occur, for example, when the user launches another app or receives a phone call.
c. The app that's currently on the screen at a given time is in the foreground (the user can interact with it, and the app consumes the CPU) and all other apps are in the background (the user cannot interact with them, and they"re typically not consuming the CPU).
d. When another app comes into the foreground, the app that was previously in the foreground is given the opportunity to remain in the foreground.
Q:
A TextView's Gravity property specifies the alignment of the TextView's text, whereas the layout Gravity property specifies ________
Q:
(True/False) A view's layout Weight (in certain layouts, such as LinearLayout) specifies the view's relative importance with respect to other views in the layout. By default, all views have a Weight of 1.
Q:
By default, a SeekBar's range is 0 to 100 and its current value is indicated by its ________ property.
Q:
Which of the following statements is false?
a. There are several predefined colors (each starts with @android:color) in Android's Holo theme. You can also use any custom color created from a combination of red, green and blue components called RGB valueseach is an integer in the range 0"255 that defines the amount of red, green and blue in the color, respectively.
b. Custom colors are defined in hexadecimal (base 16) format, so the RGB components are values in the range 00"FF.
c. Android also supports alpha (transparency) values in the range 0 (completely opaque) to 255 (completely transparent).
d. To use alpha, you specify the color in the format #AARRGGBB, where the first two hexadecimal digits represent the alpha value. If both digits of each color component are the same, you can use the abbreviated formats #RGB or #ARGB. For example, #9AC is treated as #99AACC and #F9AC is treated as #FF99AACC.
Q:
(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.
Q:
Literal numeric values that specify view dimensions (e.g., widths, heights and spacing) should be placed in the ________ resource file.
Q:
When you hover over an EditText in the Palette, a tooltip indicates the ________.
Q:
(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.
Q:
The Graphical Layout editor's Palette provides preconfigured TextViews named ________, ________ and _________ (in the Form Widgets section) to represent the theme's corresponding text sizes.