title: How to append text to a TextView after setText()?
body: <p>This is <code>MainActivity</code> of my calculator application in which I am trying to first <code>setText()</code> and then append to the <code>TextView main</code>.</p>
  
  <p>My problem is that <code>append()</code> does work but it only appends once after I call the <code>setText()</code> method. I want it to append text multiple times.</p>
  
  <p>How do I do that?    </p>
  
  <pre><code>public class MainActivity extends Activity implements OnClickListener {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.calculator_screen);
  
          TextView main = (TextView) findViewById(R.id.maintextView);
          main.setText("0.");
  
          Button btnSeven = (Button) findViewById(R.id.btnseven);
          btnSeven.setOnClickListener(this);
      }
  
      @Override
      public void onClick(View view) {
         switch(view.getId()) {
             case R.id.btnseven:
                 TextView main = (TextView) findViewById(R.id.maintextView);
                 main.setText("");
                 main.append("7");
                 break;
             default :
                 break;
          }
      }
  }
  </code></pre>