Deck 1: Basics of Android: Hello World

Full screen (f)
exit full mode
Question
We can access the activity_main.xml resource file from the layout directory using the expression ___________.
Use Space or
up arrow
down arrow
to flip the card.
Question
The colors.xml file contains ___________ constants.
Question
The int parameter of the setContentView( int ) method represents:

A) a count.
B) a random integer.
C) a resource.
D) 0 or 1.
Question
What hex number represents green?

A) FF0000
B) 00FF00
C) 0000FF
D) 000000
Question
A color has been defined in colors.xml using < color name="myColor">#33FD42< /color>. How do you use it?

A) @color/myColor
B) @color/33FD42
C) color/myColor
D) color/33FD42
Question
It is possible to run an app inside the emulator in horizontal orientation.
Question
Which class do we use to send some output to Logcat?

A) Logcat
B) System
C) Print
D) Log
Question
It is possible to set up breakpoints throughout the code so that we can debug the app.
Question
In order to test an app on a device, we need to:

A) do nothing.
B) download a driver for the device.
C) disconnect the device from the computer.
D) download a device for the driver.
Question
The name of the XML attribute that we use to specify that an app will run in horizontal orientation only is:

A) android:orientation.
B) android:screen.
C) android:screenOrientation.
D) orientation.
Question
XML elements can be nested.
Question
Which of the following code snippets defines a valid dimension element?

A) < dimens name="my_margin">20dp< /dimens>
B) < dimen name="my_margin">20dp< /dimen>
C) < name dimen="my_margin">16dp< /name>
D) < my_margin name="dimen">16dp< /my_margin>
Question
Android apps can be distributed via:

A) the App Store.
B) the Android Market.
C) Google Play.
D) the Apple Store.
Question
The red, green, and blue values of a gray shade are all equal. Including black and white, how many shades of gray are there?

A) 8
B) 256
C) 16
D) 16.7 million
Question
The name of the directory where we should place the icon file for the app is:

A) drawable.
B) raw.
C) mipmap.
D) values.
Question
Which of the following defines a valid String element?

A) < strings name="my_name">20dp< /strings>
B) < string name="my_name">20dp< /string>
C) < name string="my_name">16dp< /name>
D) < my_name name="string">16dp< /my_name>
Question
The AppCompatActivity's direct superclass is:

A) MainActivity.
B) Activity.
C) AppCompat.
D) Main.
Question
The strings.xml file contains __________________ constants.
Question
AVD stands for __________________.
Question
It is possible to preview a GUI XML file inside the environment without running the app.
Question
It is possible to filter the output inside Logcat.
Question
An XML element can have only 0 or 1 attribute.
Question
We can test an app on a device only in vertical orientation.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/23
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 1: Basics of Android: Hello World
1
We can access the activity_main.xml resource file from the layout directory using the expression ___________.
R.layout.activity_main
2
The colors.xml file contains ___________ constants.
color
3
The int parameter of the setContentView( int ) method represents:

A) a count.
B) a random integer.
C) a resource.
D) 0 or 1.
a resource.
4
What hex number represents green?

A) FF0000
B) 00FF00
C) 0000FF
D) 000000
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
5
A color has been defined in colors.xml using < color name="myColor">#33FD42< /color>. How do you use it?

A) @color/myColor
B) @color/33FD42
C) color/myColor
D) color/33FD42
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
6
It is possible to run an app inside the emulator in horizontal orientation.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
7
Which class do we use to send some output to Logcat?

A) Logcat
B) System
C) Print
D) Log
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
8
It is possible to set up breakpoints throughout the code so that we can debug the app.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
9
In order to test an app on a device, we need to:

A) do nothing.
B) download a driver for the device.
C) disconnect the device from the computer.
D) download a device for the driver.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
10
The name of the XML attribute that we use to specify that an app will run in horizontal orientation only is:

A) android:orientation.
B) android:screen.
C) android:screenOrientation.
D) orientation.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
11
XML elements can be nested.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following code snippets defines a valid dimension element?

A) < dimens name="my_margin">20dp< /dimens>
B) < dimen name="my_margin">20dp< /dimen>
C) < name dimen="my_margin">16dp< /name>
D) < my_margin name="dimen">16dp< /my_margin>
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
13
Android apps can be distributed via:

A) the App Store.
B) the Android Market.
C) Google Play.
D) the Apple Store.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
14
The red, green, and blue values of a gray shade are all equal. Including black and white, how many shades of gray are there?

A) 8
B) 256
C) 16
D) 16.7 million
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
15
The name of the directory where we should place the icon file for the app is:

A) drawable.
B) raw.
C) mipmap.
D) values.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following defines a valid String element?

A) < strings name="my_name">20dp< /strings>
B) < string name="my_name">20dp< /string>
C) < name string="my_name">16dp< /name>
D) < my_name name="string">16dp< /my_name>
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
17
The AppCompatActivity's direct superclass is:

A) MainActivity.
B) Activity.
C) AppCompat.
D) Main.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
18
The strings.xml file contains __________________ constants.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
19
AVD stands for __________________.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
20
It is possible to preview a GUI XML file inside the environment without running the app.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
21
It is possible to filter the output inside Logcat.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
22
An XML element can have only 0 or 1 attribute.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
23
We can test an app on a device only in vertical orientation.
Unlock Deck
Unlock for access to all 23 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 23 flashcards in this deck.