我得到這個錯誤消息「無法從Runnable接口轉換主題」這出現了威脅T =新的Runnable(R);不能從Runnable接口轉換主題
這裏是我的代碼...
final String[] texts = new String[]{player, player11, player111}; //etc
final Runnable r = new Runnable(){
public void run(){
for(final int i=0;i<texts.length;i++){
synchronized(this){
wait(30000); //wait 30 seconds before changing text
}
//to change the textView you must run code on UI Thread so:
runOnUiThread(new Runnable(){
public void run(){
TextView t = (TextView) findViewById(R.id.textView1);
t.setText(texts[i]);
}
});
}
}
};
Thread T = new Runnable(r);
T.start();
因此,如何將我得到修復呢?我是一個業餘愛好者 –