Handler handler = new Handler() {
public void handleMessage(Message msg) {
super.handleMessage(msg);
ReturnShow.setText(sMsg);//ReturnShow EditText
ReturnShow.setSelection(ReturnShow.length());
}
};
class ReadThread extends Thread {
public void run() {
sMsg = "...";
handler.sendMessage(handler.obtainMessage());
}
}
每次运行时,setText
线路都会出错,我不知道为什么?
谢谢你的帮助。