Somehow this does not work, for me it should be like this:
public void Splash(){
Timer timer= new Timer();
timer.schedule(new TimerTask(){
MexGame.this.runOnUiThread(new Runnable() {
public void run(){
SplashImage.setImageDrawable(aktieknop);
}
});
},SplashTime);
}
Does anyone know where I am missing something?
FORMAL COMMENT I know a stupid problem, or maybe I'm doing something impossible, but I tried all the logical possibilities. So something is probably missing or I'm trying to do something that is impossible. Could you help me. I am trying to use the following code, but this gives problems with the token:
Timer timer= new Timer();
timer.schedule(new TimerTask(){
runOnUiThread(new Runnable() {
public void run(){
SplashImage.setImageDrawable(aktieknop);}
});}
},SplashTime);
If I block runOnUiThread, it will work, since I am trying to adapt the user interface from another thread, but at least there is no problem with the token, does anyone know?
Timer timer= new Timer();
timer.schedule(new TimerTask(){
public void run(){
SplashImage.setImageDrawable(aktieknop);}
},SplashTime);
Diego