NEW
Font size
WorksheetsAndroid Studio สอบ
Total questions: 20
Worksheet time: 11mins
Which file do you alter the image displayed by the ImageView in?
MainActivity
AndroidManifest.xml
Drawable
Activity_main_xml
Which listener is called for the device to register the enter key press?
OnHoverListener
OnKeyListener
OnClickListener
OnContextClickListener
Which is the correct line of code to get the ID of the EditText you intend to use?
EditText TextHandler = findViewById(R.id.nameTextField);
EditText TextHandler = (EditText)findViewById(nameTextField);
EditText = (EditText)findViewById(R.id.nameTextField);
EditText TextHandler = (EditText)findViewById(R.id.nameTextField);
What does this icon in Android Studio do?
Add a new activity
Run the AVD Device Manager
Debug the app
Run the emulator
Which component property should be changed to a name that is specific of the components use?
Content Description
Editable
Text
ID
Which Android Studio file is most of the app coding done in?
MainActivity.java
Activity_main_xml
AndroidManifest.xml
What does this icon do when pressed in Android Studio?
Open the AVD Device Manager
Run the emulator
Add a new activity
Debug the app
What is the system image that the virtual device was set up to support?
JellyBean
Ice-cream sandwich
KitKat
Marshmallow
Which folder do you copy and paste an image into?
Resources
Java
Drawable
Layout
Which is correct for using any image with the name "trainstation"?
Android:src="trainstation"
Src=@drawable/trainstation
Android:src="@drawable/trainstation"
Android:"@drawable/trainstation"
What is the purpose of the 'Gradle' build system in Android Studio?
To manage app dependencies
To run the emulator
To write Java code
To design the user interface
Which layout is best suited for creating a responsive UI in Android?
LinearLayout
FrameLayout
RelativeLayout
ConstraintLayout
What is the function of the 'AndroidManifest.xml' file?
To store user data
To manage app resources
To define app permissions
To write the main activity code
What is the primary purpose of the 'res' folder in an Android project?
To write the main activity code
To define app permissions
To manage application resources
To store Java source files
Which method is used to start a new activity in Android?
startActivity()
openActivity()
beginActivity()
launchActivity()
What is the function of the 'onCreate()' method in an Android activity?
To define app permissions
To initialize the activity
To handle user input
To manage app resources
What is the purpose of the 'onResume()' method in an Android activity?
To destroy the activity
To pause the activity
To resume the activity after it was paused
To initialize the activity
Which file is used to define the layout of an Android activity?
Activity_main.xml
AndroidManifest.xml
MainActivity.java
build.gradle
What is the function of the 'setContentView()' method in an Android activity?
To handle user interactions
To set the title of the activity
To define the layout for the activity
To initialize the app's resources
What is the purpose of the 'onPause()' method in an Android activity?
To pause the activity and save its state
To resume the activity after it was paused
To destroy the activity
To initialize the activity
