Search in sources :

Example 1 with BusStopEventRequest

use of cl.smartcities.isci.transportinspector.serverConnection.requests.pushRequests.BusStopEventRequest in project androidApp by InspectorIncognito.

the class BusStopEventBuilder method buildIncompleteReport.

@Override
public void buildIncompleteReport(IncompleteReportEventDrawableItem incompleteReportPanelItem) {
    final ServerSentEvent event = new ServerSentEvent(incompleteReportPanelItem);
    ReportBusListDialog dialog = new ReportBusListDialog();
    dialog.setServices(busStop.getServices());
    dialog.setListener(new CustomArrayAdapter.ItemClickListener<String>() {

        @Override
        public void onItemClick(String service) {
            Log.d("BusStopEventBuilder", service + ", " + event);
            listener.onRequestReady(new BusStopEventRequest(listener, event, busStop, service), busStop.getId());
        }
    });
    dialog.show(context.getSupportFragmentManager(), "services");
}
Also used : ReportBusListDialog(cl.smartcities.isci.transportinspector.dialogs.ReportBusListDialog) CustomArrayAdapter(cl.smartcities.isci.transportinspector.adapters.CustomArrayAdapter) ServerSentEvent(cl.smartcities.isci.transportinspector.model.gson.ServerSentEvent) BusStopEventRequest(cl.smartcities.isci.transportinspector.serverConnection.requests.pushRequests.BusStopEventRequest)

Example 2 with BusStopEventRequest

use of cl.smartcities.isci.transportinspector.serverConnection.requests.pushRequests.BusStopEventRequest in project androidApp by InspectorIncognito.

the class BusStopEventBuilder method buildCompleteReport.

@Override
public void buildCompleteReport(CompleteReportEventDrawableItem completeReportPanelItem) {
    ServerSentEvent event = new ServerSentEvent(completeReportPanelItem);
    listener.onRequestReady(new BusStopEventRequest(listener, event, busStop), busStop.getId());
}
Also used : ServerSentEvent(cl.smartcities.isci.transportinspector.model.gson.ServerSentEvent) BusStopEventRequest(cl.smartcities.isci.transportinspector.serverConnection.requests.pushRequests.BusStopEventRequest)

Aggregations

ServerSentEvent (cl.smartcities.isci.transportinspector.model.gson.ServerSentEvent)2 BusStopEventRequest (cl.smartcities.isci.transportinspector.serverConnection.requests.pushRequests.BusStopEventRequest)2 CustomArrayAdapter (cl.smartcities.isci.transportinspector.adapters.CustomArrayAdapter)1 ReportBusListDialog (cl.smartcities.isci.transportinspector.dialogs.ReportBusListDialog)1