Code example for Chronometer

Methods: getText, getBase, stop

0
        }); 
 
        stop = (Button) findViewById(R.id.stop);
        stop.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Stoppuhr.stop();
                timeWhenStopped = Stoppuhr.getBase() - SystemClock.elapsedRealtime(); //verstrichene Zeit in Variable speichern 
 
                trainingsdauer = Stoppuhr.getText().toString();
                // Ausgabe.setText("Trainingsdauer: "+ trainingsdauer); 
                start.setText("Continue");
                start.setClickable(true);
                stop.setClickable(false);
                locationManager.removeUpdates(locationListener);
 
            } 
        }); 
 
        /** 
         * reset = (Button) findViewById(R.id.reset); 
         * reset.setOnClickListener(new View.OnClickListener() { public void