Self-Review Exercises

4.1 Fill in the blanks in each of the following statements:

a) ___________are typically used to launch activities—they indicate an action to be performed and the data on which that action is to be performed.

b) We implement interface ___________ to handle the events that occur when the user touches a button on an AlertDialog.

c) Lengthy data access should never be done in the UI thread; otherwise, the app will display a(n) ___________ dialog—typically after five seconds of inactivity.

d) An Intent is a description of an action to be performed with associated ___________.

e) ___________Intents specify an exact Activity class to run in the same app.

f) When you create the project for each Android app in Eclipse, the ADT Plugin creates and configures the ___________ file (also known as the app’s manifest), which describes information about the app.

g) A(n) ___________ displays a list items that is scrollable if the complete list cannot be displayed on the screen.

h) A(n) ___________ creates an object that populates the ListView using data from an ArrayList collection object.

i) ___________ is a subclass of ImageView which provides additional capabilities that enable an image to be used like a Button object.

4.2 State whether each of the following is true or false. If false, explain why.

a) Extensive input/output should be performed on the UI thread; otherwise, this will affect your app’s responsiveness.

b) You call toArray (with an empty String array as an argument) on the Set object to convert the Set into an array of Strings.

c) When an Activity’s primary task is to display a scrollable list of items, you can extend class ListActivity, which uses a ListView that occupies the entire app as its default layout.

d) ListView is a subclass of Adapter—a GUI component is bound to a data source.

e) When customizing a ListActivity subclass’s GUI, the layout must contain a ListView with its Id attribute set to "@android:id/list"—the name that class ListActivity uses to reference its ListView.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.217.220