@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.gpstest); if (gpsmanager == null) gpsmanager = new TrackManager(); if (gpsmanager.isRunning()) setProgressBarIndeterminateVisibility(true); }
public void onButtonClick(View view) { switch (view.getId()) { case R.id.but_gps_start: gpsmanager.start(Track.MODE_JOGGING); setProgressBarIndeterminateVisibility(true); break; case R.id.but_gps_pause: gpsmanager.pause(); setProgressBarIndeterminateVisibility(false); break; case R.id.but_gps_stop: gpsmanager.stop(); setProgressBarIndeterminateVisibility(false); break; case R.id.but_gps_delete: gpsmanager.deleteCurrentTrack(); break; case R.id.but_gps_show: gpsmanager.show(); break; } }