Deck 3: Coding the Gui Programmatically, Layout Managers
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/20
العب
ملء الشاشة (f)
Deck 3: Coding the Gui Programmatically, Layout Managers
1
A GUI cannot be defined programmatically; we must define it in an XML file.
False
2
____________ is a layout manager class that organizes GUI components in a grid.
GridLayout
3
It is possible to retrieve the width of the screen programmatically.
True
4
What is the only method of the View.OnClickListener interface?
A) click
B) onClickView
C) clicked
D) onClick
A) click
B) onClickView
C) clicked
D) onClick
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
5
Adding a Null GUI component to a View will result in a(n) ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
6
Gravity is in the ____________ package.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
7
In order to implement game play inside the Activity class (the Controller), we ____________ methods of the Model.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
8
If B is a public, static, inner class of A, ____________ refers to B.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
9
One of the spec methods of GridLayout has the following API:
Public, static GridLayout.Spec spec( int s1, int s2 )
What do s1 and s2 represent?
A) Nothing, these parameters are useless.
B) s1 is the number of rows, and s2 is the number of columns.
C) s1 is the starting index, and s1 is the size.
D) s2 is the size, and s1 is the starting index.
Public, static GridLayout.Spec spec( int s1, int s2 )
What do s1 and s2 represent?
A) Nothing, these parameters are useless.
B) s1 is the number of rows, and s2 is the number of columns.
C) s1 is the starting index, and s1 is the size.
D) s2 is the size, and s1 is the starting index.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
10
The show method belongs to the AlertDialog.Builder class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
11
What method do we use to set the number of rows in a GridLayout?
A) setRowsCount
B) setRowCount
C) setRow
D) setRows
A) setRowsCount
B) setRowCount
C) setRow
D) setRows
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
12
We used the GridLayout.Spec class in the chapter. What can we say about Spec?
A) It is a private, static, inner class of GridLayout.
B) It is a protected, static, inner class of GridLayout.
C) It is a public, static, inner class of GridLayout.
D) It is a public, static, independent class from GridLayout.
A) It is a private, static, inner class of GridLayout.
B) It is a protected, static, inner class of GridLayout.
C) It is a public, static, inner class of GridLayout.
D) It is a public, static, independent class from GridLayout.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
13
An AlertDialog.Buider constructor has this API:
Public AlertDialog.Buider ( Context context)
Inside an Activity class, when using the constructor, what argument do we pass?
A) We do not pass any argument.
B) void
C) this
D) main
Public AlertDialog.Buider ( Context context)
Inside an Activity class, when using the constructor, what argument do we pass?
A) We do not pass any argument.
B) void
C) this
D) main
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
14
When we call the getSize method of the Display class, its Point parameter gets written too.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
15
The Color class in the android.graphics package is the same as the Color class in the java.XYZ.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
16
A dialog box can have only one button inside.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
17
If we want to code the View programmatically and separate the View from the Controller, then we should have an instance variable representing the View inside the Controller so that we can call the methods of the View in order to update it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
18
The getDefaultDisplay method from the WindowManager interface returns a __________________ reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
19
The View.OnClickListener interface can be implemented to handle a __________________ event on a View.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
20
If TicTacToe is the class for the Model and we are inside the Activity class (the Controller), we can use an instance variable of type __________________ to represent the Model.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck