@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { debug( 0, "requestCode=" + requestCode + ", REQUEST_ADD_TO_TRIP=" + ADD_TO_TRIP + ", CALENDER=" + CALENDAR + ", etc..."); if (resultCode == Activity.RESULT_CANCELED) { return; } switch (requestCode) { case ADD_TO_TRIP: debug( 2, "Returned pois to add to trip!"); // From using PoiList to select new POIs to add to // trip trip = data.getParcelableExtra(IntentPassable.TRIP); pois = trip.getPois(); poiAdapter.replaceAll(pois); lv.setAdapter(poiAdapter); poiAdapter.notifyDataSetChanged(); break; case CALENDAR: this.trip = data.getParcelableExtra(IntentPassable.TRIP); poiAdapter.notifyDataSetChanged(); break; default: debug(0, "No handler for result=" + resultCode); break; } } // onActivityResult
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.triplist); init(); poiAdapter.notifyDataSetChanged(); userLocation = StartActivity.verifyUserLocation(userLocation, this); } // onCreate