2012-09-25 21:31:06 +00:00
|
|
|
package com.dougkeen.bart.activities;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
2012-10-19 21:44:37 +00:00
|
|
|
import com.dougkeen.bart.BartRunnerApplication;
|
|
|
|
import com.dougkeen.bart.R;
|
2012-09-25 21:31:06 +00:00
|
|
|
import com.dougkeen.bart.model.Constants;
|
|
|
|
import com.dougkeen.bart.model.Station;
|
2013-04-04 05:16:15 +00:00
|
|
|
import com.dougkeen.bart.model.StationPair;
|
2012-09-25 21:31:06 +00:00
|
|
|
|
|
|
|
public class QuickRouteDialogFragment extends AbstractRouteSelectionFragment {
|
|
|
|
|
2012-10-19 21:44:37 +00:00
|
|
|
public QuickRouteDialogFragment() {
|
|
|
|
super(BartRunnerApplication.getAppContext().getString(
|
|
|
|
R.string.quick_departure_lookup));
|
|
|
|
}
|
|
|
|
|
2012-09-25 21:31:06 +00:00
|
|
|
@Override
|
|
|
|
protected void onOkButtonClick(Station origin, Station destination) {
|
2013-04-04 05:16:15 +00:00
|
|
|
Intent intent = new Intent(getActivity(), ViewDeparturesActivity.class);
|
|
|
|
intent.putExtra(Constants.STATION_PAIR_EXTRA, new StationPair(origin,
|
|
|
|
destination));
|
|
|
|
startActivity(intent);
|
2012-09-25 21:31:06 +00:00
|
|
|
}
|
|
|
|
}
|