WorksheetsAndroid Unit 2
Total questions: 20
Worksheet time: 10mins
Which package contains the core classes related to drawing and event handling on the Android screen?
Which method is used to access a UI component defined in XML?
getView()
findViewById()
setView()
loadView()
The basic building block of the Android user interface is:
Activity
Fragment
Layout
View
Which attribute is mandatory to access a UI control programmatically?
android:layout_width
android:id
android:layout_height
android:text
Which class is used to display text to the user?
EditText
Button
TextView
Label
Which attribute automatically converts phone numbers and URLs into clickable links?
android:clickable
android:autoLink
android:inputType
android:linkify
EditText is a subclass of:
View
Button
Layout
TextView
Which UI element is commonly used for user input in login forms?
TextView
Spinner
EditText
RatingBar
Input filters are mainly used to:
Improve UI design
Restrict user input
Display suggestions
Handle click events
AutoCompleteTextView requires which component to supply data?
Fragment
Intent
Adapter
LayoutInflater
Which adapter is used when data comes from an array?
CursorAdapter
SimpleAdapter
ArrayAdapter
BaseAdapter
MultiAutoCompleteTextView allows:
Only one value
Password input
Multiple values separated by commas
Numeric values only
Which UI control allows selection of only one option from a dropdown list?
ListView
GridView
Spinner
CheckBox
Spinner is associated with which class?
ViewGroup
AdapterView
Layout
Fragment
Which button is mainly used to perform an action like form submission?
ToggleButton
ImageButton
Button
RadioButton
An ImageButton differs from a Button because it:
Has no click events
Uses an image as its label
Cannot display text
Cannot be styled
Which UI control allows multiple selections?
RadioButton
Spinner
CheckBox
Switch
CheckBox is a subclass of:
View
Button
CompoundButton
TextView
ToggleButton displays its state using:
Icons
textOn and textOff
Progress bar
Radio buttons
Which widget introduced after Android 4.0 provides a slider-style toggle?
CheckBox
ToggleButton
SeekBar
Switch
