title: Android countdown timer wont accept variable
body: <p>i just started to learn creating android apps. I wanted to create a simple count down timer that takes a value from a edittext but countdown timer does not seem to run.</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      countDownTxt = (TextView) findViewById(R.id.countDownView);
      intervalTxt = (TextView) findViewById(R.id.intervalText);
  
      findViewById(R.id.startBN).setOnClickListener(
              new View.OnClickListener() {
                  public void onClick(View v) {
                      int testInt = 30;
                      //countDownTxt.setText(intervalTxt.getText());
                      int interval = Integer.parseInt(intervalTxt.getText().toString());
                      Log.d("buttonpressed", "interval for countdown is " + interval);
  
                      cdt = new CountDownTimer(Integer.parseInt(intervalTxt.getText().toString()), 1000) {
                           public void onTick(long millisUntilFinished) {
                               Log.d("counttimer1", "haha1");
                               countDownTxt.setText(""+ millisUntilFinished / 1000);
                           }
  
                           public void onFinish() {
                               cancel();
                           }
                        }.start();
                  }
              }
      );
  }
  </code></pre>
  
  <p>In particular, this program works only if i enter a numerical value such as 30000 in the 1st parameter of the CountDownTimer "cdt = new CountDownTimer(testInt, 1000)"</p>
  
  <p>Can someone enlighten me please? Thank you!</p>