1.
Which folder do you copy and paste an image into?
Correct Answer
C. Drawable
Explanation
When working with Android development, images are typically stored in the "Drawable" folder. This folder is specifically designed for storing image assets that will be used in the user interface of the application. Therefore, when copying and pasting an image, it should be placed in the "Drawable" folder to ensure that it can be easily accessed and utilized within the app.
2.
Which component property should be changed to a name that is specific of the components use?
Correct Answer
B. ID
Explanation
The ID property should be changed to a name that is specific to the component's use. The ID property is typically used to uniquely identify an element in a document, and using a specific name that describes the component's purpose can make it easier to understand and maintain the code.
3.
Which is correct for using any image with the name "trainstation"?
Correct Answer
D. Android:src="@drawable/trainstation"
Explanation
The correct answer is "android:src="@drawable/trainstation"". This is the correct way to reference an image with the name "trainstation" in an Android application. The "@drawable/" prefix is used to indicate that the image is located in the drawable resource folder, and "trainstation" is the name of the image file without the file extension. By using this syntax, the image will be properly displayed in the designated location.
4.
Which listener is called for the device to register the enter key press?
Correct Answer
B. OnKeyListener
Explanation
The correct answer is OnKeyListener. This listener is called for the device to register the enter key press. It allows the program to detect when the enter key is pressed on the device's keyboard and perform a specific action in response to that event.
5.
Which Android Studio file is most of the app coding done in?
Correct Answer
A. MainActivity.java
Explanation
The correct answer is MainActivity.java. This file is where most of the app coding is done in Android Studio. It contains the main code for the app's functionality and is responsible for controlling the app's behavior and user interface. The MainActivity.java file is an essential part of the Android app development process and is where developers write the code to define the app's behavior and logic.
6.
What is the system image that the virtual device was set up to support?
Correct Answer
D. Marshmallow
Explanation
The virtual device was set up to support the system image of Marshmallow.
7.
Which file do you alter the image displayed by the ImageView in?
Correct Answer
B. Activity_main_xml
Explanation
The correct answer is activity_main_xml because this file is responsible for defining the layout of the main activity in an Android application. It contains the XML code that specifies the elements and their properties, including the ImageView that displays the image. By modifying this file, you can change the image displayed by the ImageView.
8.
Which is the correct line of code to get the ID of the EditText you intend to use?
Correct Answer
A. EditText TextHandler = (EditText)findViewById(R.id.nameTextField);
Explanation
The correct line of code to get the ID of the EditText is "EditText TextHandler = (EditText)findViewById(R.id.nameTextField);" This line of code uses the "findViewById" method to locate the EditText with the ID "nameTextField" and assigns it to the variable "TextHandler" of type EditText.
9.
What does this icon in Android Studio do?
Correct Answer
A. Run the emulator
Explanation
This icon in Android Studio is used to run the emulator. By clicking on this icon, the developer can launch the emulator and test their application on it. This is an important step in the development process as it allows the developer to see how the app will behave on a virtual device before deploying it on an actual device.
10.
What does this icon do when pressed in Android Studio?
Correct Answer
A. Open the AVD Device Manager
Explanation
Pressing this icon in Android Studio opens the AVD Device Manager. The AVD Device Manager is a tool used to manage and create virtual devices for testing Android applications. By opening this manager, developers can create, edit, and delete virtual devices, as well as launch them for testing purposes. This feature is essential for developers to ensure that their applications are compatible with different device configurations and screen sizes.