I don't get this :
In a ShakeListener class, I execute a routine in the containing class.
The routine is :
public void showWord(){
myShakeListener.stop();
flipper.showNext();
v.vibrate(countdown5, -1);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
myShakeListener.start();
}
Strange thing (to me, still a beginner), is that the thread sleeps BEFORE the next view is shown. Why is that?
What I want to accomplish : user shakes phone -> viewflipper flips to next -> Phone is unresponsive to shaking for 5 seconds -> user shakes phone -> viewflipper flips to next...
thnx