how to stop Handler in Android?
<p>In My Application my handler doesn't stop. How can I stop the handler?<br>
It continues to start after closing the activity. What can i do? </p>

<p>the code is :</p>

<pre><code> handler = new Handler()
        {
            @Override
            public void handleMessage(Message msg) 
            {
                // TODO Auto-generated method stub
                super.handleMessage(msg);
                if(i&lt;max)
                {
                    evnetChangedisplay(i);
                    i++;
                        handler.sendEmptyMessageDelayed(0, 5000);
                    }
                else
                    {
                        i = 0;
                        handler.sendEmptyMessageDelayed(0,0000);
                    }
                }
        };
handler.sendEmptyMessageDelayed(0,000);
</code></pre>
