Handler.removecallbacks Not Working
public class MainActivity extends AppCompatActivity { int total = 0,k=0,j=0,i; public EditText editText; private int mInterval = 1000; Handler mHandler = new Handl
Solution 1:
OnDestroy() to destroy the handler, this is where I don't know what to do
Sanjay change your OnDestroy() function to
@OverridepublicvoidonDestroy() {
mHandler.removeCallbacksAndMessages(null);
super.onDestroy(); // notice: we call super after removing handler callbacks and messages
}
Post a Comment for "Handler.removecallbacks Not Working"