wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Android Unit 2

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which package contains the core classes related to drawing and event handling on the Android screen?

a)

android.widget

b)

android.content

c)

android.view

2.

Which method is used to access a UI component defined in XML?

a)

getView()

b)

findViewById()

c)

setView()

d)

loadView()

3.

The basic building block of the Android user interface is:

a)

Activity

b)

Fragment

c)

Layout

d)

View

4.

Which attribute is mandatory to access a UI control programmatically?

a)

android:layout_width

b)

android:id

c)

android:layout_height

d)

android:text

5.

Which class is used to display text to the user?

a)

EditText

b)

Button

c)

TextView

d)

Label

6.

Which attribute automatically converts phone numbers and URLs into clickable links?

a)

android:clickable

b)

android:autoLink

c)

android:inputType

d)

android:linkify

7.

EditText is a subclass of:

a)

View

b)

Button

c)

Layout

d)

TextView

8.

Which UI element is commonly used for user input in login forms?

a)

TextView

b)

Spinner

c)

EditText

d)

RatingBar

9.

Input filters are mainly used to:

a)

Improve UI design

b)

Restrict user input

c)

Display suggestions

d)

Handle click events

10.

AutoCompleteTextView requires which component to supply data?

a)

Fragment

b)

Intent

c)

Adapter

d)

LayoutInflater

11.

Which adapter is used when data comes from an array?

a)

CursorAdapter

b)

SimpleAdapter

c)

ArrayAdapter

d)

BaseAdapter

12.

MultiAutoCompleteTextView allows:

a)

Only one value

b)

Password input

c)

Multiple values separated by commas

d)

Numeric values only

13.

Which UI control allows selection of only one option from a dropdown list?

a)

ListView

b)

GridView

c)

Spinner

d)

CheckBox

14.

Spinner is associated with which class?

a)

ViewGroup

b)

AdapterView

c)

Layout

d)

Fragment

15.

Which button is mainly used to perform an action like form submission?

a)

ToggleButton

b)

ImageButton

c)

Button

d)

RadioButton

16.

An ImageButton differs from a Button because it:

a)

Has no click events

b)

Uses an image as its label

c)

Cannot display text

d)

Cannot be styled

17.

Which UI control allows multiple selections?

a)

RadioButton

b)

Spinner

c)

CheckBox

d)

Switch

18.

CheckBox is a subclass of:

a)

View

b)

Button

c)

CompoundButton

d)

TextView

19.

ToggleButton displays its state using:

a)

Icons

b)

textOn and textOff

c)

Progress bar

d)

Radio buttons

20.

Which widget introduced after Android 4.0 provides a slider-style toggle?

a)

CheckBox

b)

ToggleButton

c)

SeekBar

d)

Switch