wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Android Studio สอบ

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

Which file do you alter the image displayed by the ImageView in?

a)

MainActivity

b)

AndroidManifest.xml

c)

Drawable

d)

Activity_main_xml

2.

Which listener is called for the device to register the enter key press?

a)

OnHoverListener

b)

OnKeyListener

c)

OnClickListener

d)

OnContextClickListener

3.

Which is the correct line of code to get the ID of the EditText you intend to use?

a)

EditText TextHandler = findViewById(R.id.nameTextField);

b)

EditText TextHandler = (EditText)findViewById(nameTextField);

c)

EditText = (EditText)findViewById(R.id.nameTextField);

d)

EditText TextHandler = (EditText)findViewById(R.id.nameTextField);

4.

What does this icon in Android Studio do?

a)

Add a new activity

b)

Run the AVD Device Manager

c)

Debug the app

d)

Run the emulator

5.

Which component property should be changed to a name that is specific of the components use?

a)

Content Description

b)

Editable

c)

Text

d)

ID

6.

Which Android Studio file is most of the app coding done in?

a)

MainActivity.java

b)

Activity_main_xml

c)

AndroidManifest.xml

7.

What does this icon do when pressed in Android Studio?

a)

Open the AVD Device Manager

b)

Run the emulator

c)

Add a new activity

d)

Debug the app

8.

What is the system image that the virtual device was set up to support?

a)

JellyBean

b)

Ice-cream sandwich

c)

KitKat

d)

Marshmallow

9.

Which folder do you copy and paste an image into?

a)

Resources

b)

Java

c)

Drawable

d)

Layout

10.

Which is correct for using any image with the name "trainstation"?

a)

Android:src="trainstation"

b)

Src=@drawable/trainstation

c)

Android:src="@drawable/trainstation"

d)

Android:"@drawable/trainstation"

11.

What is the purpose of the 'Gradle' build system in Android Studio?

a)

To manage app dependencies

b)

To run the emulator

c)

To write Java code

d)

To design the user interface

12.

Which layout is best suited for creating a responsive UI in Android?

a)

LinearLayout

b)

FrameLayout

c)

RelativeLayout

d)

ConstraintLayout

13.

What is the function of the 'AndroidManifest.xml' file?

a)

To store user data

b)

To manage app resources

c)

To define app permissions

d)

To write the main activity code

14.

What is the primary purpose of the 'res' folder in an Android project?

a)

To write the main activity code

b)

To define app permissions

c)

To manage application resources

d)

To store Java source files

15.

Which method is used to start a new activity in Android?

a)

startActivity()

b)

openActivity()

c)

beginActivity()

d)

launchActivity()

16.

What is the function of the 'onCreate()' method in an Android activity?

a)

To define app permissions

b)

To initialize the activity

c)

To handle user input

d)

To manage app resources

17.

What is the purpose of the 'onResume()' method in an Android activity?

a)

To destroy the activity

b)

To pause the activity

c)

To resume the activity after it was paused

d)

To initialize the activity

18.

Which file is used to define the layout of an Android activity?

a)

Activity_main.xml

b)

AndroidManifest.xml

c)

MainActivity.java

d)

build.gradle

19.

What is the function of the 'setContentView()' method in an Android activity?

a)

To handle user interactions

b)

To set the title of the activity

c)

To define the layout for the activity

d)

To initialize the app's resources

20.

What is the purpose of the 'onPause()' method in an Android activity?

a)

To pause the activity and save its state

b)

To resume the activity after it was paused

c)

To destroy the activity

d)

To initialize the activity