Hello! I'm really confused about this, but when I'm trigging a thread from my SurfaceView, im sending a Handler with the constructor like this
private static Thread thread;
public SurfaceView(Context localContext) {
//other stuff
thread = new Thread(mySurfaceHolder, myEngine, this, new Handler());
//other stuff
}
and in my thread-class I assign a Handler-object with the handler I sent from my view, like this:
public Thread (SurfaceHolder lHolder,
Engine lEngine,
View lView,
Handler lHandler){
surfaceHolder = lHolder;
engine = lEngine;
view = lView;
handler = lHandler;
}
So what does this Handler do? I never use it in my thread-class in any ways, so why are the examples on the web still showing me that I should send a handler with the constructor? I can't see the connection....
Thanks in advance!