title: try to count onclick android
body: <p>I need to count clicks and display number of clicks on <code>textView2</code> and my code just displays the number 4. I used a while loop to check the number of clicks.</p>
  
  <pre><code>public void Clicks(View v){
      final TextView answerLabel = (TextView)findViewById(R.id.textView1); //show text from answer variable.
       TextView count = (TextView) findViewById(R.id.textView2); //display click count.
      String answer = null;
      int i = 0;
      while(i &lt; 5){   // I allow user click just 5 time.
  
      switch (v.getId()){
          case R.id.button1 :
             answer= "ROCK";
             answerLabel.setText(answer);
             count.setText(String.valueOf(i));
             i++;
          break;
          case R.id.button2 :
           answer = "SCISSOR";
           answerLabel.setText(answer);
           count.setText(String.valueOf(i));
           i++;
           break;
          case R.id.button3 :
          answer = "PAPER";
          answerLabel.setText(answer);
          count.setText(String.valueOf(i));
          i++;
          break;
          }
      }   
  }
  </code></pre>
  
  <p>How do I display it properly?</p>