Exam 6: Managing the Device Orientation

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The getConfiguration method from the Resources class returns a __________________ reference.

Free
(Short Answer)
4.9/5
(37)
Correct Answer:
Verified

Configuration

The ViewGroup.LayoutParameters class contains a setMargins method that allows us to set all four margins.

Free
(True/False)
4.9/5
(43)
Correct Answer:
Verified

True

The following instance variable of the Configuration class stores the height of the device in dp units, not including the status bar.

Free
(Multiple Choice)
4.7/5
(33)
Correct Answer:
Verified

C

The XML attribute for the bottom margin of a GUI component is __________________.

(Short Answer)
4.8/5
(36)

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?

(Multiple Choice)
4.8/5
(35)

The constant of the Configuration class whose value is an integer that represents a horizontal orientation is __________________.

(Short Answer)
4.7/5
(40)

The getResources method from the Context class returns a __________________ reference.

(Short Answer)
4.8/5
(36)

The parameter of onConfigurationChanged allows us to retrieve the orientation of the device.

(True/False)
4.8/5
(38)

The XML attribute for the left margin of a GUI component is ____________.

(Short Answer)
4.8/5
(33)

It is possible to define the GUI programmatically for both horizontal and vertical orientations.

(True/False)
4.8/5
(37)

We set the android:configChanges attribute of the activity element in the AndroidManifest.xml file if we want to get notified of ____________.

(Short Answer)
4.8/5
(39)

Which instance variable of the Configuration class stores the width of the device in dp units?

(Multiple Choice)
4.8/5
(43)

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?

(Multiple Choice)
4.9/5
(44)

Assuming the AndroidManifest.xml is correct, the onConfigurationChanged method of the Activity class is automatically called when we rotate the device.

(True/False)
4.9/5
(35)

The resolveAttribute method of the ____________ class checks whether an attribute is present in a theme.

(Short Answer)
4.9/5
(42)

How do we retrieve the data stored in a TypeValue named tv?

(Multiple Choice)
4.8/5
(37)

The getDimensionPixelSize method of the Resources class returns the number of __________________ of a resource given its id.

(Short Answer)
4.9/5
(33)

The orientation instance variable of the Configuration class represents the ____________ of the device.

(Short Answer)
4.8/5
(35)

It is possible to have one XML file for a horizontal layout and another XML file for a vertical layout.

(True/False)
4.9/5
(44)

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.

(True/False)
4.7/5
(32)
Showing 1 - 20 of 22
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)