/** Initializes the activity. */ private void init() { db = DBFactory.getInstance(context); res = getResources(); if (getIntent().getParcelableExtra("trip") != null) { trip = (Trip) getIntent().getParcelableExtra("trip"); title = (TextView) findViewById(R.id.triplabel); title.setText(trip.getLabel()); } else { debug(0, "No trip supplied.. exit activity"); this.finish(); } debug(2, "FreeTrip=" + trip.isFreeTrip()); lv = getListView(); lv.setOnItemLongClickListener(new DrawPopup()); poiAdapter = new PoiAdapter(this, R.layout.plan_listitem, pois); lv.setAdapter(poiAdapter); for (Poi p : trip.getPois()) { pois.add(p); } } // init