title: Android Change TextView text from another class
body: <p>I have a <code>TextView</code> in <code>MainActivity</code>, I would like to change the <code>TextView</code> text within another class.</p>
  
  <p>How can I access <code>TextView</code> in <code>MainActivity</code> from another class?</p>
  
  <p>I tried the following</p>
  
  <p>TextView textView = (TextView) findViewById(R.id.myTextView);</p>
  
  <p>textView.setText("Text");</p>
  
  <p>But the app crashes when calling <code>setText()</code></p>