COP4656 Final Preperation Flashcards

1
Q

_______ is/are typically used to launch activities—they indicate an action to be performed and the data on which that action is to be performed.

A

intents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_______ is a subclass of RecyclerView.LayoutManager that can be used to display items in a vertical list.

A

LinearLayoutManager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An Intent is a description of an action to be performed with associated _______.

A

data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Extensive input/output should be performed on the UI thread; otherwise, this will affect your app’s responsiveness.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

RecyclerView was designed as a better ListView. It provides better separation of the data’s presentation from the RecyclerView’s capabilities for reusing views, as well as more flexible customization options for presenting the RecyclerView’s items.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Each RecyclerView item has a corresponding object of a subclass of class RecyclerView.ViewHolder that maintains references to the item’s view(s) for reuse.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A layout fills the entire client area of the screen if the layout’s Width and Height properties (in the Layout Parameters section of the Properties window) are each set to _______.

A

match_parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

An Algorithm specifies an action to be performed and the data to be acted upon—Android uses Algorithms to launch the appropriate activities.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

_______ object stores key-value pairs.

A

SharedPreference

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You implement interface View.OnClickListener of package android.view to specify the code that should execute when the user touches a Button.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

_____ refers to an architectural style for implementing web services, often called RESTful web services

A

REST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A(n) ______ is a button that floats over the user interface.

A

FloatingActionButton

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Class _______ provides methods for accessing the elements of a JSON array.

A

JSONArray

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Each value in a JSON array can be a string, a number, a JSON representation of an object, true, false or null

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A ListAdapter populates a ListView using data from an ArrayList collection object.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

To receive a JSON response from a web service invoked by an HttpUrlConnection, you
read from the connection’s InputStream

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Class JSONObject’s _______ method returns the String for a given key.

A

getString

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Each object in JSON is represented as a list of property names and values contained in
curly braces, in the following format:
{ “propertyName1” : value1, “propertyName2’”: value2 }

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

To perform long-running tasks that result in updates to the GUI, Android provides class _______ (package android.os), which performs the long-running operation in one thread and delivers the results to the GUI thread.

A

AsyncTask

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Media files (such as the sounds we used in the FSU’s Fear the Spear app), are placed in the app’s resource folder ________.

A

res/raw

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

To process simple touch events in an app, override View method onTouchEvent, then use constants from class ________ (package android.view) to test which type of event occurred and process it accordingly.

A

MotionEvent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

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

A

SoundPool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

The Android documentation recommends that games use the ________ to play sounds, because that stream’s volume can be controlled via the device’s volume buttons.

A

music audio stream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

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

A

Layer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Canvas’s ________ method draws a circle.

A

drawCircle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

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

A

AttributeSet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

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

A

onSizeChanged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

You can terminate a Thread by calling its setRunning method with the argument ________.

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Class SoundPool’s ________ method gives the resources associated with a SoundPool back to the system.

A

release

30
Q

An Activity’s onResume method is called when a Fragment is on the screen and ready for the user to interact with it.

A

False

31
Q

Most devices have a(n) ________ for detecting device movement.

A

accelerometer

32
Q

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

Paint

33
Q

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

34
Q

Accelerometer information is delivered to the app as ________ values.

A

float

35
Q

You use class SensorManager’s ________ method to stop listening for accelerometer events.

A

unregisterListener

36
Q

When the user selects a Fragment’s menu item, Fragment method ________ responds to the selection.

A

onOptionItemSelected

37
Q

Call inherited View method ________ to indicate that the View needs to be redrawn.

A

invalidate

38
Q

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

reset

39
Q

When a Fragment is removed from a parent Activity, method ________ is called.

A

onDetach

40
Q

Resource folder names that begin with anim contain XML files that define ________, which can change an object’s transparency, size, position and rotation over time.

A

tweened

41
Q

An object of class ________ contains public instance variable orientation containing either ORIENTATION_PORTRAIT or ORIENTATION_LANDSCAPE for the device’s current orientation.

A

Configuration

42
Q

Android uses a technique known as ________ to communicate information between activities within one app or activities in separate apps.

A

Intent Messaging

43
Q

Which of the following is a key technlogy for implementing Android apps?

All of the answers are correct
Java
Android SDK (Software Development Kit)
Android Studio IDE (Integrated Development

A

All of the answers are correct

44
Q

One benefit of developing Android apps is the openness of the platform. The operating system is ________ and free. This allows you to view Android’s source code and see how its features are implemented.

A

open source

45
Q

With web services, you can create ________, which enable you to rapidly develop apps by quickly combining complementary web services, often from different organizations and possibly other forms of information feeds.

A

mashups

46
Q

________ is now Google’s preferred Android IDE. It’s based on the JetBrains IntelliJ IDEA Java IDE.

A

android studio

47
Q

Before running an app in the Android 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.

A

Android Virtual Device (AVD)

48
Q

A class houses the ________ that perform the class’s tasks.

A

methods

49
Q

________ are views that contain and arrange other

A

Layouts

50
Q

The ________ folder contains the files you’ll edit to create your apps’ GUIs and logic

A

app

51
Q

Android apps have four types of executable components—activities, services, content providers and _________.

A

broadcast receivers

52
Q

Throughout its life, an Activity can be in one of several states—active (i.e., running), _________ or stopped.

A

paused

53
Q

To respond to events when the user changes the text in an EditText, you’ll use an anonymous inner class to implement the _________ interface (from package android-.text).

A

TextWatcher

54
Q

When you set a view’s _________ property, Android automatically casts a shadow for that view.

A

elevation

55
Q

T or F

A GridLayout row’s height is determined by the row’s tallest view–similarly, a column’s width is defined by the column’s widest view.

A

False

56
Q

The default layout for an Empty Activity is a _________.

A

RelativeLayout

57
Q

Each app has a theme that defines the default look-and-feel of the standard views you use. The theme is specified in the app’s AndroidManifest.xml file. You can customize aspects of an app’s theme, such those that define an app’s color scheme, by defining style resources in the _________ file located in the app’s res/values folder.

A

styles.xml

58
Q

Java requires that you override every method in an _________ that you implement.

A

interface

59
Q

The default layout for an Empty Activity is a _________.

A

relative layout

60
Q

For apps you submit to the Google Play store, the _________ is used as the app’s unique identifier.

A

package name

61
Q

Fragments can be hosted by an Activity or they can execute independently.

True or False

A

False

62
Q

Resource folder names that begin with anim contain XML files that define ________, which can change an object’s transparency, size, position and rotation over time.

A

tweened

63
Q

An object of class ________ contains public instance variable orientation containing either ORIENTATION_PORTRAIT or ORIENTATION_LANDSCAPE for the device’s current orientation.

A

Configuration

64
Q

Android uses a technique known as ________ to communicate information between activities within one app or activities in separate apps.

A

intent message

65
Q

An Activity is launched by using a(n) ________ that indicates an action to be performed and the data on which to perform that action.

A

intent

66
Q

Each app based on the Blank Activity template includes a FloatingActionButton (which typically emphasizes an important action that the user can perform by touching the button) and other material design features.

True or False

A

True

67
Q

The default activity_main.xml layout embeds (via an element in the XML) the GUI defined in content_main.xml.

True or False

A

True

68
Q

The default activity_main.xml layout also contains a FloatingActionButton—a round image button from the Android Design Support Library that has a higher ele-vation than the GUI’s other components, so it “floats” over the GUI.

True or False

A

True

69
Q

By convention array resources are normally defined in arrays.xml, colors in colors.xml, Strings in strings.xml and numeric values in ________.

A

values.xml

70
Q

By default, the IDE set the layout’s Padding Left and Padding Right properties to a predefined dimension resource named @dimen/activity_horizontal_margin—located in the ________ file of the project’s res/values folder.

A

dimens.xml

71
Q

Method getConfiguration returns a Configuration object (package android.content.res) containing public instance variable ________, which specifies the device’s screen-size category.

A

screenLayout