简体   繁体   中英

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!

TextView有一个setText方法。

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.

problemName.setText("hhhjkbgjg");

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

android.widget.TextView have setText();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM