Setting text in activity using Button
<p>I was wondering what is the correct way to set the text of a TextView after a button has been pushed? I currently have an app that would change the text every time the activity was created (but for now it only sets the text as one value for testing purposes):</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.mama);
    TextView joke = (TextView) findViewById(R.id.TextView02);
    joke.setText("This is a test");
    Button nextButton = (Button) findViewById(R.id.Button01);
    nextButton.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            startActivity(new Intent(JokesMamaActivity.this, JokesMamaActivity.class));
            finish();
        }
    });
}
</code></pre>

<p>How would I be able to set the text without creating a new activity, and have the ability to continually change the text after the button has been clicked?</p>
