How To Stop A Runnable By Using A ButtonStop In Android
I am developing a simple application in which buttons background change dynamically after one second. I have a button in my app name stopButtonBackgroundChanging, as I click the bu
Solution 1:
I believe you will get this to work by changing the your onClick:
public void onClick(View v)
{
//See implementation of stop() method at the end of the code
((UpdateRunnable) mEndlessRunnable).stop();
}
Post a Comment for "How To Stop A Runnable By Using A ButtonStop In Android"