예제 #1
0
  @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);
  }
예제 #2
0
 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;
   }
 }