Deck 2: Model View Controller, Gui Components, Events
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/20
Play
Full screen (f)
Deck 2: Model View Controller, Gui Components, Events
1
If we want to handle persistent data in an app, we can use the Model View Controller ____________ architecture.
Store
2
A Model can be used only in Android apps, not in other Java applications.
False
3
The class that renders a keyboard is ____________.
KeyboardView
4
Two constants that can be used as values of android:layout_width and android:layout_height are ____________ and ____________.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
5
To position Views relative to each other, we can use a(n) ____________ (layout manager).
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
6
It is possible to specify the transparency of a View.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
7
A style can inherit from another style.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
8
In order to retrieve a View that has been given an id, we use the ____________ method.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
9
A CharSequence can be converted to a String by calling its toString method.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
10
In order to register a TextWatcher on a GUI component, we call the ____________ method.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
11
Which class enables the user to enter text?
A) TextField
B) EditText
C) EditView
D) Text
A) TextField
B) EditText
C) EditView
D) Text
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
12
Which class is not a subclass of Button?
A) CheckBox
B) Switch
C) RadioButton
D) EditText
A) CheckBox
B) Switch
C) RadioButton
D) EditText
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
13
Which attribute do we use to specify the margin above a View?
A) margin
B) android:marginTop
C) android:layout_marginTop
D) android:layout_margin
A) margin
B) android:marginTop
C) android:layout_marginTop
D) android:layout_margin
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
14
What is the correct definition of an item inside a style (assuming that the color abc is correctly defined in colors.xml)?
A) < item name="android:background">< /item>
B) < item name="android:background">@color/abc< /item>
C) < item name="android:background">abc< /item>
D) < item name="android:background">color/abc< /item>
A) < item name="android:background">< /item>
B) < item name="android:background">@color/abc< /item>
C) < item name="android:background">abc< /item>
D) < item name="android:background">color/abc< /item>
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
15
When a button is clicked on by the user, we want the method foo to execute. How do we do it (inside the Button element of the activity_main.xml file)?
A) android:onClick="foo"
B) android="foo"
C) android:onClick="@activity/foo"
D) onClick="foo"
A) android:onClick="foo"
B) android="foo"
C) android:onClick="@activity/foo"
D) onClick="foo"
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
16
Button is a subclass of TextView.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
17
The Model is the middleman between the __________________ and the Controller.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
18
The superclass for layout classes is __________________.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
19
The XML attribute that we use to give an id to a View is __________________.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck
20
The __________________ interface provides three methods that are called when the text changes inside a TextView.
Unlock Deck
Unlock for access to all 20 flashcards in this deck.
Unlock Deck
k this deck