--- android/TrainInfo/src/dk/thoerup/traininfo/StationListAdapter.java 2011/07/08 12:47:02 1557 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationListAdapter.java 2011/07/08 13:10:53 1558 @@ -20,10 +20,14 @@ Context context; NumberFormat number = NumberFormat.getNumberInstance(); - public StationListAdapter(Context context) { + boolean showDistance; + + public StationListAdapter(Context context, boolean showDistance) { super(); this.context = context; + this.showDistance = showDistance; + inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); number.setMaximumFractionDigits(1); number.setMinimumFractionDigits(1); @@ -65,7 +69,7 @@ tview.setText(station.getName()); tview = (TextView) root.findViewById(R.id.stationDistance); - if (station.getCalcdist() != 0) { + if (showDistance == true) { tview.setText( context.getString(stationlistadapter_distance) + " " + number.format( (double)station.getCalcdist()/1000.0) + " km."); } else { tview.setVisibility(View.GONE);