I am using a handler in the following program and I want to stop it when i=5 but the handler doesn\'t stop and run continuously.
b1.setOnClickListener(ne
protected void onStop() { super.onStop(); handler.removeCallbacks(runnable); }
you can stop it like this