January 2014
Intermediate to advanced
736 pages
70h 43m
English
Figure 8.25 begins class ContactListFragment’s declaration. Lines 23–30 declare the nested interface ContactListFragmentListener, which contains the callback methods that MainActivity implements to be notified when the user selects a contact (line 26) and when the user touches the menu item to add a new contact (line 29). Line 32 declares instance variable listener which will refer to the object (MainActivity) that implements the interface. Instance variable contactListView (line 34) will refer to the ContactListFragment’s builtin ListView, so we can interact with it programmatically. Instance variable contactAdapter will refer to the CursorAdapter that populates ...
Read now
Unlock full access