one handler running in this time click the gallery handler will stop next 3 sec will run handler how can implemented
<p>hi 
 i am gallery application   i am using  handler in rotating gallery images
    protec</p>

<pre><code>ted void onStart() {
        super.onStart();
        isUpdateUI = true;
        mRedrawHandler.handleMessage(new Message());

    } 
    @Override
    protected void onPause()
    {
        super.onPause();
        isUpdateUI = false;
    }
    class RefreshHandler extends Handler {
            @Override
        public void handleMessage(Message msg) {            
            SeaSpell.this.updateUI();
        }

        public void sleep(long delayMillis) {

            this.removeMessages(0);         
            if(isUpdateUI==true)
                sendMessageDelayed(obtainMessage(0), delayMillis);}
}
public void updateUI(){

     getImages();//this is gallery rotation method
        mRedrawHandler.sleep(5000);}
</code></pre>

<p>next activity gallery image clicking 
    g.setOnItemClickListener(new OnItemClickListener() {</p>

<pre><code>   public void onItemClick(AdapterView&lt;?&gt; parent, View v, final int position, long id) 
    {

        timer.schedule(new TimerTask(){

        public void run()
        {
        try {
            isUpdateUI=false;} },5000)});
</code></pre>

<p>click the gallery item or scrooling  then  handler will stop  in 5sec will be running  how can implemented  this topic critical one please  forward some solution  i am try to more days but not get any solution  please forward some suggestion</p>
