title: Triying to make a chronometer on Android
body: <p>I'm triying to make a chronometer on Android with timer and the sheduleAtFixedRate method, but it looks like calling my textview inside the run method of the timer is making my application stop. What I'm I doing wrong? here's my code:</p>
  
  <pre><code>Button boton_iniciar;
  TextView texto_cronometro;
  Timer count;
  int a = 0;
  
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_cronometro);
  
      /**********************/
      boton_iniciar = (Button) findViewById(R.id.button1);
      texto_cronometro = (TextView) findViewById(R.id.textView1);
      count= new Timer("Contador");
      boton_iniciar.setOnClickListener(new OnClickListener() {
  
          public void onClick(View v) {
              // TODO Auto-generated method stub
              count.scheduleAtFixedRate(new TimerTask() {         
                  @Override
                  public void run() {
                      // TODO Auto-generated method stub
                      a++;
                      texto_cronometro.setText(String.valueOf(a));
                  }
              }, 100, 100);
          }
      });
  }
  </code></pre>