title: Increase TextView by integer variable
body: <p>I have a button with a simple onClick method. Everytime when the button is clicked i want my TextView to increase by 1. For example my TextView shows 0
  and when the button is clicked it schould show 1 and when the button is clicked again it should show 2...and so on. I hope my point is clear ;)</p>
  
  <p>public class game extends Activity {</p>
  
  <pre><code>ViewGroup layout;
  TextView score1;
  String score;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.game);
  
      score1 = (TextView)findViewById(R.id.textView5);
  
      score = score1.getText().toString();
  
      layout = (ViewGroup) findViewById(R.id.frameLayout2);
      layout.setOnTouchListener(
              new RelativeLayout.OnTouchListener() {
                  @Override
                  public boolean onTouch(View v, MotionEvent event) {
  
                      String presentValStr=score1.getText().toString();
                      int presentIntVal=Integer.parseInt(presentValStr);
                      presentIntVal++;
                      score1.setText(String.valueOf(presentIntVal));
  
                      return true;
                  }
              }
  
                  );
  }
  </code></pre>