AddEditFragment Instance Variables

Figure 8.36 lists the class’s instance variables:

• Variable listener refers to the AddEditFragmentListener that’s notified when the user clicks the Save Contact button.

• Variable rowID represents the current contact being manipulated if this Fragment was displayed to allow the user to edit an existing contact.

• Variable contactInfoBundle will be null if a new contact is being added or will refer to a Bundle of contact information if an existing contact is being edited.

• The instance variables at lines 36–42 will refer to the Fragment’s EditTexts.

30      private AddEditFragmentListener listener;31 32      private long rowID; // database row ID of the contact33      private ...

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.