Add platform info to departures listing
This commit is contained in:
parent
9bfff84165
commit
6f18d4877a
@ -471,7 +471,7 @@ public class ViewDeparturesActivity extends Activity implements
|
||||
if (mActionMode == null)
|
||||
mActionMode = startActionMode(new DepartureActionMode());
|
||||
mActionMode.setTitle(mSelectedDeparture.getTrainDestinationName());
|
||||
mActionMode.setSubtitle(mSelectedDeparture.getTrainLengthText());
|
||||
mActionMode.setSubtitle(mSelectedDeparture.getTrainLengthAndPlatform());
|
||||
}
|
||||
|
||||
private class DepartureActionMode implements ActionMode.Callback {
|
||||
|
@ -114,7 +114,7 @@ public class YourTrainLayout extends RelativeLayout implements Checkable {
|
||||
.setText(boardedDeparture.getTrainDestination().toString());
|
||||
|
||||
((TextView) findViewById(R.id.yourTrainTrainLengthText))
|
||||
.setText(boardedDeparture.getTrainLengthText());
|
||||
.setText(boardedDeparture.getTrainLengthAndPlatform());
|
||||
|
||||
ImageView colorBar = (ImageView) findViewById(R.id.yourTrainDestinationColorBar);
|
||||
((GradientDrawable) colorBar.getDrawable()).setColor(Color
|
||||
|
@ -98,7 +98,7 @@ public class DepartureArrayAdapter extends ArrayAdapter<Departure> {
|
||||
.findViewById(R.id.estimatedArrival);
|
||||
if (estimatedArrival != null) {
|
||||
((TextView) view.findViewById(R.id.trainLengthText))
|
||||
.setText(departure.getTrainLengthText());
|
||||
.setText(departure.getTrainLengthAndPlatform());
|
||||
estimatedArrival.setText(arrivesAtDestinationPrefix
|
||||
+ estimatedArrivalTimeText);
|
||||
} else {
|
||||
@ -111,13 +111,13 @@ public class DepartureArrayAdapter extends ArrayAdapter<Departure> {
|
||||
textSwitcher.setCurrentText(arrivesAtDestinationPrefix
|
||||
+ estimatedArrivalTimeText);
|
||||
} else {
|
||||
textSwitcher.setCurrentText(departure.getTrainLengthText());
|
||||
textSwitcher.setCurrentText(departure.getTrainLengthAndPlatform());
|
||||
}
|
||||
textSwitcher.setTextProvider(new TextProvider() {
|
||||
@Override
|
||||
public String getText(long tickNumber) {
|
||||
if (tickNumber % 4 == 0) {
|
||||
return departure.getTrainLengthText();
|
||||
return departure.getTrainLengthAndPlatform();
|
||||
} else {
|
||||
final String estimatedArrivalTimeText = departure
|
||||
.getEstimatedArrivalTimeText(getContext());
|
||||
|
@ -172,7 +172,11 @@ public class Departure implements Parcelable, Comparable<Departure> {
|
||||
}
|
||||
|
||||
public String getTrainLengthText() {
|
||||
return trainLength + " car train";
|
||||
return trainLength + " cars";
|
||||
}
|
||||
|
||||
public String getTrainLengthAndPlatform() {
|
||||
return trainLength + " cars, platform " + getPlatform();
|
||||
}
|
||||
|
||||
public boolean getRequiresTransfer() {
|
||||
|
Loading…
Reference in New Issue
Block a user