我已经尝试过使用线程,但它不成功,使用EditText作为输入改变TextView文本后,textView没有改变。请帮帮我!如何在Android中持久更改TextView文本?
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
//shared is SharedPreferences object that I define as an instance variable
String inp = shared.getString("input", def);
textView.setText(inp);
Log.d("input",inp);
});
thread.start();
你能解释一下你想要做什么? –