Hello togehter
I need a regular method in my app. The problem is: the following timer in the code do its action just one time. And the timer do it only(the one time) if i do an action( touch the display) after the time(2000) is over. U know what i mean? Maybe it have sth to do with the "OnTouchListener"?
public class DrawView extends View implements OnTouchListener{
Timer timer = new Timer();
public DrawView(Context context)
{
timer.schedule(new Task(this), 2000);
}
public boolean onTouch(View view, MotionEvent event)
{}
}
class Task extends TimerTask
{
private DrawView _dw;
public Task(DrawView dw){
this._dw = dw;}
public void run()
{
_dw.newgame();
}
}