I'm using a postDelayed runnable thread, I need to pause and resume that thread when I press a button. Please anyone help me on that.
This is my thread:
protected void animation_music6() {
music4.postDelayed(new Runnable() {
public void run() {
music4.setVisibility(View.VISIBLE);
animationmusic4();
holemusic4();
}
}, 10000);
}
I need to pause the thread when i press a button and resume from where i pause the thread. I have used to pause the thread is:
music4.removeCallbacks(runnable4);
How i can resume the thread? Can anyone please help me. Is there any way to pause and resume the thread? I am a new to the android, So please help me to do this. Thanks in Advance.