Implementing Activity Callbacks

Android calls a number of callbacks to let you draw your screen, store data before pausing, and refresh data after closing. You must implement at least some of these methods. See Lifetime of a Screen to learn when and in what order these methods are called. Here are some of the standard types of screen classes that Android provides:

• android.app.Activity - This is a standard screen, with no specialization.

• android.app.ListActivity - This is a screen that is used to display a list of something. It hosts a ListView object, and exposes methods to let you identify the selected item, receive callbacks when the selected item changes, and perform other list-related actions.

• android.app.Dialog - This is a small, popup dialog-style window that isn't intended to remain in the history stack. (It is not resizeable or moveable by the user.)

0 0

Post a comment