Search code examples
androidtextview

How I can clear the value of TextView?


The value of the TextView is inserted by selecting the Item on List (ArrayList). When I close and open the app again the value in the TextView is still there. There is some way to clear the value of TextView?


Solution

  • TextView myTextView = (TextView) findViewById(R.id.myTextView);
    myTextView.setText("");