@Override public void onClick(View view) { switch (view.getId()) { case R.id.top_bar: Intents.thresholdsEditor(this, sensorManager.getVisibleSensor()); break; case R.id.note_save: saveNote(); break; case R.id.note_delete: deleteNote(); break; case R.id.note_left: noteClicked(noteIndex - 1); break; case R.id.note_right: noteClicked(noteIndex + 1); break; case R.id.gauge_container: showDialog(SelectSensorHelper.DIALOG_ID); break; case R.id.view_photo: Intents.viewPhoto(this, photoUri()); break; default: super.onClick(view); break; } }
@Override protected void onResume() { super.onResume(); initialize(); initializeNoteViewer(); updateGauges(); updateKeepScreenOn(); topBarHelper.updateTopBar(sensorManager.getVisibleSensor(), topBar); Intents.startIOIO(context); Intents.startDatabaseWriterService(context); }
public void finishSession(long sessionId) { synchronized (this) { tracker.complete(sessionId); Intents.triggerSync(applicationContext); } cleanup(); }
@Override public void onClick(View view) { switch (view.getId()) { case R.id.toggle_heat_map_button: toggleHeatMapVisibility(); updateButtons(); break; case R.id.zoom_in: mapView.getController().zoomIn(); break; case R.id.zoom_out: mapView.getController().zoomOut(); break; case R.id.locate: centerMap(); break; case R.id.view_photo: Intents.viewPhoto(this, photoUri()); break; default: super.onClick(view); } }