title: how to clear text view when i click on button in android programing
body: <p>how to clear text view when i click on button in android programing</p>
  
  <pre><code>chk1=(CheckBox)findViewById(R.id.one);
  chk2=(CheckBox)findViewById(R.id.two);
  chk3=(CheckBox)findViewById(R.id.three);
  btn=(Button)findViewById(R.id.btn);
  tv=(TextView)findViewById(R.id.tv);
  
  btn.setOnClickListener( 
      new OnClickListener()
      {
          @Override
          public void onClick(View arg0) {
              tv.setText(" ");
              if(chk1.isChecked()) {
                  str+=chk1.getText().toString();
              }
              if(chk2.isChecked()) {
                  str+=chk2.getText().toString();
              }
              if(chk3.isChecked()) {
                  str+=chk3.getText().toString();
              }
              tv.setText(str);
              tv.setFreezesText(true);
          }
      });
  }
  </code></pre>