Reputation: 165
I have a TextView that displays an error message in the login page of my activity. I do not know how to clear its value when i come back to this activity. i used editText.setText("")
for an EditText field. but when i tried to use this for my TextView it showed a NullPointerException
What could be used here ?
error = (TextView) findViewById(R.id.errorPopUp);
Upvotes: 0
Views: 688
Reputation: 5996
in onResume()
method:
@Override
protected void onResume()
{
super.onResume();
error.setText("");
}
Upvotes: 2