title: Preventing Negative Numbers in TextView
body: <p>I have a TextView that displays a number (in this case, the number is 10). </p>
  
  <p>Now, i have a button so the user has to press that button 10 times in order for the number to hit 0, resulting in moving on to the next level. However, </p>
  
  <p>I can keep hitting that button and it starts its way back into the negatives (-1, -2, etc.). </p>
  
  <p>I tried to think of how I would prevent this but I'm at loss.. any ideas?</p>
  
  <p>-----------------------------------EDIT-----------------------------------------</p>
  
  <p>Okay, so here is my update (I got it to stop at 0):</p>
  
  <pre><code>public void onClick(View v) {
          // TODO Auto-generated method stub
  
          if (scr &gt;= 1) {
  
              scr = scr - 1;
             TextView Score = (TextView) findViewById(R.id.Score);
             Score.setText(String.valueOf(scr));
          }
  
          if (scr == 10) 
          {
                 aCounter.start();
          }
  
          if (scr == 1) 
          {
              aCounter.cancel();
              new AlertDialog.Builder(Tap_Game_Activity.this)
               .setTitle("Congratulations!").setMessage("Go to Level 2?")
               .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface AlertDialog, int PositiveButton) {
                    setContentView(R.layout.activity_level02_activity);
                }
                 })
               .setNegativeButton("No", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface AlertDialog, int NegativeButton) {
                     }
                     }).show();
          }
  
      }});
  }
  </code></pre>
  
  <p>(EDIT!): I fixed the AlertDialog by changing the 2 'Else If' statements to just 'If' statements. However, my timer still doesn't work :(, any help?</p>