9.13 DetailFragment Class

The DetailFragment class displays one contact’s information and provides menu items on the app bar that enable the user to edit or delete that contact.

9.13.1 Superclass and Implemented Interface

Figure 9.47 lists the package statement, import statements and the beginning of the DetailFragment class definition. The class extends Fragment and implements the LoaderManager.LoaderCallbacks<Cursor> interface to respond to LoaderManager events.

Fig. 9.47 package statement, import statements, superclass and implemented interface

The computer code has 211 lines.

9.13.2 DetailFragmentListener

Figure 9.48 declares the nested ...

Get Android How to Program, 3/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.