COP4656 Final Preperation Flashcards
_______ 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.
intents
_______ is a subclass of RecyclerView.LayoutManager that can be used to display items in a vertical list.
LinearLayoutManager
An Intent is a description of an action to be performed with associated _______.
data
Extensive input/output should be performed on the UI thread; otherwise, this will affect your app’s responsiveness.
False
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.
True
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.
True
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 _______.
match_parent
An Algorithm specifies an action to be performed and the data to be acted upon—Android uses Algorithms to launch the appropriate activities.
False
_______ object stores key-value pairs.
SharedPreference
You implement interface View.OnClickListener of package android.view to specify the code that should execute when the user touches a Button.
True
_____ refers to an architectural style for implementing web services, often called RESTful web services
REST
A(n) ______ is a button that floats over the user interface.
FloatingActionButton
Class _______ provides methods for accessing the elements of a JSON array.
JSONArray
Each value in a JSON array can be a string, a number, a JSON representation of an object, true, false or null
True
A ListAdapter populates a ListView using data from an ArrayList collection object.
False
To receive a JSON response from a web service invoked by an HttpUrlConnection, you
read from the connection’s InputStream
True
Class JSONObject’s _______ method returns the String for a given key.
getString
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 }
True
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.
AsyncTask
Media files (such as the sounds we used in the FSU’s Fear the Spear app), are placed in the app’s resource folder ________.
res/raw
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.
MotionEvent
An app’s sound effects are managed with a(n) ________ (package android.media), which can be used to load, play and unload sounds.
SoundPool
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.
music audio stream
A Frame-Layout is designed to display one View, but can also be used to ________ views.
Layer
Canvas’s ________ method draws a circle.
drawCircle
When a View is inflated, its constructor is called with a Context and a(n) ________ as arguments.
AttributeSet
Methods getScreenWidth and getScreenHeight return the width and height of the screen, which are updated in the ________ method.
onSizeChanged
You can terminate a Thread by calling its setRunning method with the argument ________.
false