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.
But I am not entirely sure how to do that. I have something like this that I scribbled:
TextView errorMessage = (TextView) findViewById(R.id.add_problem_validation_error);
errorMessage.setText(R.string.add_problem_validation_error);
But its not even compiling because I am not sure how to properly refer to the string.xml items and display them.
Any idea how to do this the right way?
Thanks!