GeekedOut
GeekedOut

Reputation: 17185

Android - how to reset a TextView

I set an original TextView value like this:

TextView problemName = (TextView) findViewById(R.id.some_variable);  

But at some point I need to reset it to something new. I don't see a function like setText() or anything like that. How is the displayed text supposed to be reset?

Thanks!

Upvotes: 0

Views: 4114

Answers (4)

Alexander Fuchs
Alexander Fuchs

Reputation: 1358

problemName.setText("hhhjkbgjg");

Upvotes: 1

Erick
Erick

Reputation: 29

Verify if TextView on project set import android.widget.TextView;

android.widget.TextView have setText();

Upvotes: 1

Dan S
Dan S

Reputation: 9189

textView.setText() and its overloads provide a way to change the value of the text. If you're looking to reset something else please elaborate in your question.

Upvotes: 2

Alexei
Alexei

Reputation: 1068

There is a setText method for TextView.

Upvotes: 4

Related Questions