Refreshing POIListActivity
Actions we take on POIDetailActivity, such as Save and Delete, have an effect on the data displayed in POIListActivity. We need to ensure that ListView in POIListActivity is refreshed and displays the updated POI list when it becomes active again. To achieve this, we have to depend on the activity life cycle callback methods.
As you may recall from Chapter 1, The Anatomy of an Android App, when an activity is moved to the background due to the start of a new activity, the OnPause() method is called. This would have happened for POIListActivity when POIDetailActivity was started. Once POIDetailActivity is completed by either calling the Finish() method or by pressing the device back button, the POIListActivity will be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access