Never_Nude
Never_Nude

Reputation: 27

Android clear text

I'm putting text on screen with

text.setText(text.getText().toString()+"binary message sent: "+ msg + "\n");

How can I remove the text from the screen?

Upvotes: 0

Views: 55

Answers (3)

Nathua
Nathua

Reputation: 8836

text.setText("");   //that's all

Upvotes: 3

gilonm
gilonm

Reputation: 1859

If you want to set the text to a blank field, use:

text.setText("");

If you want to hide the whole textView use:

text.setVisibility(View.GONE);

Upvotes: 2

FD_
FD_

Reputation: 12919

Just set the TextView to display an empty text:

text.setText("");

Upvotes: 3

Related Questions