Android Test 1

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

When an IDE builds a project, it puts the .dex files and the rest of the files for the project in an ________________.

.apk file

The extension for a Java source file is ________________.

.java

The ________________ is an XML file that specifies the first activity to launch when the app is started.

Android Manifest

The ________________ specifies the first activity to launch when an app is started.

AndroidManifest.xml

Native libraries in the Android stack are written in ________________.

C or C++

A/an ________________ widget lets the user enter text

EditText

You can use ________________ code to dynamically show or hide widgets

Java

Android is a/an ________________-based operating system.

Linux

In Android Studio, open projects are displayed in the ________________ window.

Project

To permanently save values in your app, you can use the ________________ class

SharedPreferences

SDK stands for ________________.

Software Development Kit

The Android system architecture is also known as the Android ________________.

Stack

. The ________________ class is the superclass for all widgets.

View

A/an ________________ widget uses a built-in browser to display web content

WebView

. Messages that are briefly displayed on the user interface are called a. toasts c. debuggers b. traces d. LogCats

a

. One of the simplest and most efficient types of layouts, which often displays only a single widget is a ________________ layout. a. frame c. linear b. table d. relative

a

A ScrollView widget displays a/an ________________ scroll bar. a. vertical c. both a and b b. horizontal d. none of the above

a

A/an ________________ allows the user to select an item from a list of items. a. spinner c. both a and b b. check box d. none of the above

a

In Android Studio, to view the XML for the layout, click the ________________ tab. a. Text c. Android b. Design d. Terminal

a

In Android Studio, when you run an app with the debugger, and it encounters a breakpoint, Android Studio a. stops before it executes the line of code at the breakpoint. b. continues to the end of the current method. c. displays the Breakpoint window. d. all of the above

a

When an activity is started, Android runs which method? a. onCreate c. onStop b. onPause d. onCreateOptionsMenu

a

Which of the following gets the current value of the seek bar? a. int volume = volumeSeekBar.getProgress(); b. int volume = volumeSeekBar.progress; c. int volume = volumeSeekBar.getValue(); d. int volume = volumeSeekBar.value;

a

An EditorAction event typically occurs when the user presses a/an ________________ key on a soft keyboard.

action

A/An ________________ stores the code for one screen of an app

activity

A/an ________________ adapter can provide the list that a spinner should display.

array

. Given this image: res/drawable-mdpi/jack_of_spades.png Which ImageView attribute specifies the location of the image? a. android:src="@drawable/jack_of_spades.png" b. android:src="@drawable/jack_of_spades" c. android:src="@drawable-mdpi/jack_of_spades.png" d. android:src="@drawable-mdpi/jack_of_spades"

b

8. The extension for a Java bytecode file is a. byt b. class c. jav d. java

b

A simple way to trace the execution of an app is to insert ________________ statements at key points in the code. a. step through c. method chaining b. LogCat logging d. stack trace

b

An example of an IDE (Integrated Development Environment) is a. Java c. Dalvik virtual machine b. Android Studio d. Android debug bridge

b

For most widgets, you can use which method(s) to get and set the text that's displayed on the widget? a. calculateAndDisplay c. toString and fromString b. getText and setText d. toWidget and toDisplay

b

In Android Studio, to view the layout in the graphical editor, click the ________________ tab. a. Text c. Android b. Design d. Terminal

b

In a linear layout, which attribute can you add to switch to horizontal orientation? a. android:weight="horizontal" b. android:orientation="horizontal" c. android:gravity="horizontal" d. android:layout="horizontal"

b

The different parts of the Android Studio main window are know as a. packages c. elements b. tool windows d. projects

b

When an activity is in the paused state, the activity a. is visible and has the focus b. has lost the focus and may be partially hidden by other activities c. has lost the focus and is completely hidden by another activity d. has the focus but is completely hidden by another activity

b

When an app starts for the first time, Android calls the a. onCreate, onRestart, and onStop methods b. onCreate, onStart, and onResume methods c. onCreate, onPause, and onDestroy methods d. onStart, onPause, and onStop methods

b

When the IDE builds a project, it compiles the ________________ into ________________ and then into________________. a. Dalvik executable files (.dex files), Java source code (.java files), Java bytecodes (.class files) b. Java source code (.java files), Java bytecodes (.class files), Dalvik executable files (.dex files) c. Java bytecodes (.class files), Java source code (.java files), Dalvik executable files (.dex files) d. Java bytecodes (.class files), Dalvik executable files (.dex files), Java source code (.java files)

b

Which directory would you expand with the Project window to display Java code in an editor? a. menu c. res b. java d. layout

b

Which of the following statements selects the second item in the spinner? a. monthsSpinner.select(1) b. monthsSpinner.setSelection(1) c. monthsSpinner.select(2) d. monthsSpinner.setSelection(2)

b

Which of these is not part of the Android stack? a. Linux b. Android Software Development Kit (SDK) c. Dalvik virtual machine (VM) d. Android apps

b

in a linear layout, the ________________ attribute determines how much space Android allocates to a widget. a. gravity c. orientation b. weight d. linear

b

To help with debugging, you can stop code execution before a line of code. You do this by setting a ________________.

breakboint

. Fixing all the errors in an app is called a. testing c. debugging b. tracing d. chaining

c

A/an ________________ is a user control such as a soft keyboard that enables users to input data, often text. a. listener b. integrated development environment (IDE) c. input method editor (IME) d. graphical layout editor

c

Although Android supports other units of measurement, it's a best practice to use a. inches c. density-independent pixels (dp) b. ems d. all of the above

c

An object that listens for an event is known as a/an a. event handler c. listener b. action key d. event

c

An on-screen keyboard is also known as a a. remote keyboard b. phone keypad c. soft keyboard d. ten key

c

Android doesn't always save the data of an activity when you a. navigate away from an activity to another activity or app b. change orientation c. both a and b d. none of the above

c

Any major release of Android a. is named after something sweet. c. both a and b. b. corresponds with an Application Programming Interface (API) number. d. none of the above

c

Given the following code in the strings.xml file, which of the following properties sets the text on the widget to "Continue"? Continue a. android:text="@string/name" b. android:textStyle="@string/name" c. android:text="@string/continue" d. android:textStyle="@string/continue"

c

In a table layout, which attribute can you add to have a widget span two columns? a. android:span="2" b. android:widget_span="2" c. android:layout_span="2" d. android:col_span="2"

c

The Android Debug Bridge (ADB) a. allows you to enter and edit the source code. b. compiles the source code. c. lets your IDE communicate with an emulator or physical Android device. d. none of the above.

c

The Click event is available from most widgets, but most __________ handle this event. a. text views c. buttons b. editable text views d. labels

c

The ________________ is an organization devoted to advancing open standards for mobile devices. a. Jelly Bean c. Open Handset Alliance b. Software Development Kit d. Android Open Source Project

c

You can ________________ one layout within another, but it can degrade performance. a. post c. nest b. list d. bury

c

. If the Hardware Keyboard option is not enabled for an emulator a. you can use the computer's hard keyboard to enter text. b. you can use the device's hard keyboard to enter text. c. you cannot enter text. d. you can use the soft keyboard to enter text.

d

. Which of the following is true? a. Android is a Linux-based operating system designed primarily for touchscreen mobile devices. b. Android code is open source. c. Android is designed for smartphones and tablets. d. All of the above

d

A common property for layouts is a. padding c. width b. height d. all of the above

d

A/an ________________ lets the user select one option from several options. a. editable text view c. text view b. check box d. radio button

d

An Android Virtual Device (AVD) is an a. integrated development environment b. debug bridge c. child element d. emulator

d

An EditText widget can be referred to as a/an a. editable text view c. text view b. text box d. both a and b

d

Android Studio a. is available for free c. runs on all modern operating systems b. is open-source d. all of the above

d

Android can be used to develop which types of apps? a. Photography c. Finance b. Reference d. All of the above

d

Android supports ________________ images. a. PNG c. GIF b. JPG d. all of the above

d

For the textSize property, it's generally considered a best practice to use _____________ to specify the size of the text. a. millimeters c. inches b. ems d. scale-independent pixels

d

Given a variable named userID, which of the following statements prints a debug message to the LogCat view that displays the value of the userID variable? a. Log.e("userID: ", userID); b. Log.d("userID: " + userID); c. Log.e(TAG, "userID: " + userID); d. Log.d(TAG, "userID: " + userID);

d

The Variables window shows the values of the variables that are in scope for the current method. This includes a. static variables. c. local variables. b. instance variables. d. all of the above.

d

There are three steps to handling an event. First, import the interface that defines a listener. Second, implement the listener. Third, a. use the Project window to connect the listener b. edit the strings.xml file c. drag the listener onto the graphical layout editor d. wire the listener to an event

d

Three common types of widgets are a. TextView, Input, EditText b. TextView, DPad, EditText c. EditText, Button, DPad d. TextView, Button, EditText

d

Typically, an event occurs when a user interacts with a/an a. wire c. listener b. event handler d. widget

d

What do Android package (.apk) files contain? a. Compiled resources b. Uncompiled resources c. .dex files d. All of the above

d

What type of content can a WebView widget display? a. Only XML b. Only HTML and CSS c. Only HTML, CSS, and JavaScript d. Any type of content that a web browser can display

d

When you create a device definition for an emulator, you can a. specify whether the device provides hardware buttons. b. specify the screen size and resolution. c. specify the Android API for the device. d. all of the above

d

When you work directly with the XML for a layout, you can a. set the properties of a widget c. add widgets to a layout b. code comments d. all of the above

d

Which of the following directories should you use to store a layout that's designed for landscape orientation? a. src/layout b. src/layout-land c. res/layout d. res/layout-land

d

Which of the following statements displays a message on the user interface that says, "Hello"? a. Toast.makeText("Hello", Toast.LENGTH_SHORT); b. Toast.makeText("Hello", Toast.LENGTH_SHORT).show(); c. Toast.makeText(this, "Hello", Toast.LENGTH_SHORT); d. Toast.makeText(this, "Hello", Toast.LENGTH_SHORT).show();

d

A/an ________________ is a special type of method that's executed when an event occurs.

event handler

The ________________ build script controls how Anrdoid Studio builds a project.

gradle

The ________________ attribute aligns a widget with the top, bottom, center, left, or right of its linear layout

gravity

It's generally considered a best practice to store the display text for your app in a separate file. This makes it easy to make your app work in multiple _______________.

languages

. Once you install an app on a device or emulator, you can use its ________________ to restart it

launcher icon

. In Android development, a/an ________________ stores XML that defines the user interface

layout

A/An ________________ is a container that contains one or more child elements such as widgets and determines how they are displayed.

layout

. A ________________ layout displays a column or row of child widgets.

linear

To restore values you have saved in your app, you can override the ________________ method.

onResume

In Android Studio, you can use the graphical editor to add widgets to a layout by dragging them from the ________________ onto your layout.

palette

A/an ________________ displays a visual indicator of the progress of an operation.

progress bar

In Android Studio, a/an ________________ contains all of the files for the app including the Java source code.

project

In Android Studio, to view and work with a layout, you would expand the ________________ directory and double-click on the layout file to open it.

res

________________ provide a way for Android to adjust the size of the text so it scales correctly for different screen densities.

scale independent pixel

. A/an ________________ lets the user specify a value by dragging a/an ________________ to the right or left.

seek bar, thumb

For security reasons, all Android apps must be digitally ________________ with a certificate.

signed

In the Frames window, a list of methods in the reverse order in which they were called is known as the

stack trace

Once you stop the execution of an app for debugging, you can use the Step Into button to ________________ the statements in the app, one statement at a time.

step through

. A ________________ layout displays widgets in rows and columns

table

When you ________________ an app, you run it to make sure that it works properly no matter what combinations of valid or invalid data you enter.

test

A/an ________________is a group of styles that define the look of the layout

theme

You can use Android to develop apps for ________________ mobile devices such as smartphones and tablet computers.

touch screen

When you ________________ the execution of an app, you add statements to your code that display messages at key points in the code. This can help you find the cause of a bug

trace

Dalvik executable files (.dex files) can be run by the ________________ .

virtual machine


संबंधित स्टडी सेट्स

The Real World SOC-210 Chapter 3 Quiz

View Set

Chapter 10 Fill in the Blank Quiz

View Set