Deck 6: Managing the Device Orientation
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/22
العب
ملء الشاشة (f)
Deck 6: Managing the Device Orientation
1
The orientation instance variable of the Configuration class represents the ____________ of the device.
orientation
2
Which instance variable of the Configuration class stores the width of the device in dp units?
A) width
B) screenWidth
C) screenWidthDp
D) widthDp
A) width
B) screenWidth
C) screenWidthDp
D) widthDp
screenWidthDp
3
We set the android:configChanges attribute of the activity element in the AndroidManifest.xml file if we want to get notified of ____________.
orientation changes
4
Assuming the AndroidManifest.xml is correct, the onConfigurationChanged method of the Activity class is automatically called when we rotate the device.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
5
It is possible to have one XML file for a horizontal layout and another XML file for a vertical layout.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
6
Assume that h is the height of the screen; we want to have x buttons on the screen all equidistant from each other; the height of each button is b. What is the distance between two buttons?
A) b
B) h/x
C) ( h - x * b )/x
D) ( h - x * b )/( x + 1 )
A) b
B) h/x
C) ( h - x * b )/x
D) ( h - x * b )/( x + 1 )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
7
The ViewGroup.LayoutParameters class contains a setMargins method that allows us to set all four margins.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
8
The XML attribute for the left margin of a GUI component is ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
9
It is possible to define the GUI programmatically for both horizontal and vertical orientations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
10
Assume that h is the height of the screen; we want to have 5 buttons on the screen all equidistant from each other; the height of each button is b. What is the distance between two buttons?
A) b
B) h/5
C) ( h - 5 * b )/5
D) ( h - 5 * b )/6
A) b
B) h/5
C) ( h - 5 * b )/5
D) ( h - 5 * b )/6
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
11
The resolveAttribute method of the ____________ class checks whether an attribute is present in a theme.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
12
How do we retrieve the data stored in a TypeValue named tv?
A) data
B) tv.data
C) tv.tvData( )
D) tv.type
A) data
B) tv.data
C) tv.tvData( )
D) tv.type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
13
The following instance variable of the Configuration class stores the height of the device in dp units, not including the status bar.
A) height
B) screenHeight
C) screenHeightDp
D) heightDp
A) height
B) screenHeight
C) screenHeightDp
D) heightDp
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
14
The parameter of onConfigurationChanged allows us to retrieve the orientation of the device.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
15
When we retrieve and modify the ViewGroup.MarginLayoutParams of a View, for example by calling the setMargins method, we actually modify the layout parameters of that View.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
16
It is possible to retrieve the height of the action bar programmatically.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
17
The constant of the Configuration class whose value is an integer that represents a horizontal orientation is __________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
18
The getConfiguration method from the Resources class returns a __________________ reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
19
The getResources method from the Context class returns a __________________ reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
20
The XML attribute for the right margin of a GUI component is __________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
21
The XML attribute for the bottom margin of a GUI component is __________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck
22
The getDimensionPixelSize method of the Resources class returns the number of __________________ of a resource given its id.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 22 في هذه المجموعة.
فتح الحزمة
k this deck