How to add a string message to Android screen dynamically
<p>I want to display an error message on an Android app screen after some error happens. So I put a string in my strings.xml file and in the code I'd simply like to tell the system to display that code.</p>

<p>But I am not entirely sure how to do that. I have something like this that I scribbled:</p>

<pre><code>TextView errorMessage = (TextView) findViewById(R.id.add_problem_validation_error);
    errorMessage.setText(R.string.add_problem_validation_error);
</code></pre>

<p>But its not even compiling because I am not sure how to properly refer to the string.xml items and display them.</p>

<p>Any idea how to do this the right way?</p>

<p>Thanks!</p>
