Exam 3: Coding the Gui Programmatically, Layout Managers

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

What is the only method of the View.OnClickListener interface?

Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
Verified

D

Gravity is in the ____________ package.

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

android.widget

When we call the getSize method of the Display class, its Point parameter gets written too.

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

True

The show method belongs to the AlertDialog.Builder class.

(True/False)
4.8/5
(41)

If B is a public, static, inner class of A, ____________ refers to B.

(Short Answer)
4.9/5
(36)

The View.OnClickListener interface can be implemented to handle a __________________ event on a View.

(Short Answer)
4.7/5
(32)

Adding a Null GUI component to a View will result in a(n) ____________.

(Short Answer)
4.8/5
(40)

The Color class in the android.graphics package is the same as the Color class in the java.XYZ.

(True/False)
4.9/5
(43)

____________ is a layout manager class that organizes GUI components in a grid.

(Short Answer)
4.8/5
(38)

It is possible to retrieve the width of the screen programmatically.

(True/False)
4.8/5
(28)

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?

(Multiple Choice)
4.9/5
(32)

What method do we use to set the number of rows in a GridLayout?

(Multiple Choice)
4.8/5
(40)

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.

(Short Answer)
4.8/5
(48)

In order to implement game play inside the Activity class (the Controller), we ____________ methods of the Model.

(Short Answer)
4.9/5
(31)

The getDefaultDisplay method from the WindowManager interface returns a __________________ reference.

(Short Answer)
5.0/5
(31)

A GUI cannot be defined programmatically; we must define it in an XML file.

(True/False)
4.9/5
(35)

A dialog box can have only one button inside.

(True/False)
4.8/5
(37)

We used the GridLayout.Spec class in the chapter. What can we say about Spec?

(Multiple Choice)
4.9/5
(33)

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.

(True/False)
4.7/5
(34)

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?

(Multiple Choice)
4.8/5
(36)
close modal

Filters

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