不知怎的,這是行不通的,據我應該是這樣的:?runOnUiThread(新的Runnable(){標點(標記)問題
public void Splash(){
Timer timer= new Timer();
timer.schedule(new TimerTask(){
MexGame.this.runOnUiThread(new Runnable() {
public void run(){
SplashImage.setImageDrawable(aktieknop);
} //Closes run()
}); //Closes runOnUiThread((){})
},SplashTime); //Closes the Timeratask((){})
} //closes Splash()
任何人在那裏我失去了一些東西什麼想法
正式講話 我知道傻問題,或者也許我做的事情是不可能的,但我嘗試了所有的邏輯可能性,所以可能失去了一些東西還是我試圖做一些事情,是不可能的。 能否請你幫我出了 我正在嘗試使用followi NG代碼,但給的令牌問題:
Timer timer= new Timer();
timer.schedule(new TimerTask(){
runOnUiThread(new Runnable() {
public void run(){
SplashImage.setImageDrawable(aktieknop);}
});}
},SplashTime);
如果我阻止了它崩潰了,因爲我在努力適應從另一個線程的UI,但至少沒有令牌的問題,任何人任何想法runOnUiThread?:
Timer timer= new Timer();
timer.schedule(new TimerTask(){
// runOnUiThread(new Runnable() {
public void run(){
SplashImage.setImageDrawable(aktieknop);}
// });}
},SplashTime);
你試過用Activity_name.this.runOnUiThread(...)嗎? –
嗨Lalit,給出了同樣的問題,日食給了我應該添加或刪除的評論;和} {等。沒有東西阻止了我得到的評論在最後與timer.schedule和SplashTime。看起來Eclipse在添加runOnUiThread時無法識別Timer Task .. – Diego