82 |
IntSet favorites = new IntSet(); |
IntSet favorites = new IntSet(); |
83 |
|
|
84 |
boolean showingFavorites = false; |
boolean showingFavorites = false; |
85 |
|
String dialogTitle; |
86 |
SharedPreferences prefs; |
SharedPreferences prefs; |
87 |
|
|
88 |
/////////////////////////////////////////////////////////////////////////////////////////// |
/////////////////////////////////////////////////////////////////////////////////////////// |
116 |
stations = (ArrayList<StationBean>) savedInstanceState.getSerializable("stations"); |
stations = (ArrayList<StationBean>) savedInstanceState.getSerializable("stations"); |
117 |
adapter.setStations(stations); |
adapter.setStations(stations); |
118 |
location = (GeoPair) savedInstanceState.getSerializable("location"); |
location = (GeoPair) savedInstanceState.getSerializable("location"); |
119 |
|
dialogTitle = savedInstanceState.getString("title"); |
120 |
|
setTitle(dialogTitle); |
121 |
} |
} |
122 |
} |
} |
123 |
|
|
129 |
dialog.dismiss(); |
dialog.dismiss(); |
130 |
outState.putSerializable("stations", (ArrayList<StationBean>) stations); |
outState.putSerializable("stations", (ArrayList<StationBean>) stations); |
131 |
outState.putSerializable("location", location); |
outState.putSerializable("location", location); |
132 |
|
outState.putString("title", dialogTitle); |
133 |
} |
} |
134 |
|
|
135 |
|
|
508 |
dialog.dismiss(); |
dialog.dismiss(); |
509 |
|
|
510 |
//set title |
//set title |
|
String title; |
|
511 |
switch (method) { |
switch (method) { |
512 |
case ByLocation: |
case ByLocation: |
513 |
title = "Traininfo DK - Nearby stations"; |
dialogTitle = "Traininfo DK - Nearby stations"; |
514 |
break; |
break; |
515 |
case ByName: |
case ByName: |
516 |
title = "Traininfo DK - Search"; |
dialogTitle = "Traininfo DK - Search"; |
517 |
break; |
break; |
518 |
case ByList: |
case ByList: |
519 |
title = "Traininfo DK - Favorites"; |
dialogTitle = "Traininfo DK - Favorites"; |
520 |
break; |
break; |
521 |
default: |
default: |
522 |
title = "";//not possible |
dialogTitle = "";//not possible |
523 |
} |
} |
524 |
|
|
525 |
StationList.this.setTitle(title); |
StationList.this.setTitle(dialogTitle); |
526 |
//set title end |
//set title end |
527 |
|
|
528 |
if (success) { |
if (success) { |