DetailsFragmentListener Interface
Figure 8.42 declares the nested interface DetailsFragmentListener
containing the callback methods that MainActivity
implements to be notified when the user deletes a contact (line 28) and when the user touches the edit menu item to edit a contact (line 31).
24 // callback methods implemented by MainActivity25 public interface DetailsFragmentListener26 {27 // called when a contact is deleted28 public void onContactDeleted();29 30 // called to pass Bundle of contact's info for editing31 public void onEditContact(Bundle arguments);32 }33
Get Android™ How to Program, Second Edition 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.