예제 #1
0
 /**
  * Launch the map with the map element to be displayed
  *
  * @param mapItem a map element to be displayed.
  */
 private void startMapActivity(MapItem mapItem) {
   trackEvent("SelectResult", mapItem.getTitle());
   Intent startMapActivity = new Intent(this, MapMainView.class);
   startMapActivity.putExtra("MapElement", mapItem);
   startMapActivity.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
   startActivity(startMapActivity);
 }
예제 #2
0
  @Override
  public void searchResultsUpdated() {
    List<MapItem> results = mModel.getSearchResults();

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.map_list);

    if (results.size() > 0) {
      for (MapItem meb : results) {
        adapter.add(meb.getTitle());
      }

      parseAndDisplayResult(adapter, results);

    } else {
      mLayout.setText(getString(R.string.map_search_no_results));
    }
  }