title: how to implement handler pause on another activity running this activity finish next continue handler
body: <p>hi  i am implementing gallery application  in this gallery circular order draging left to right and right to left scrolling  i am using one handler on gallery rotation  another activity is gallery item clicking  handler automatically running  display the gallery image another action is click the gallery image display the clicked image 
    my problem gallery image clicking  and scorring  stop handler  and not scrolling clicking next continue to handler this functionality how can implemented please some suggestion its urgent some solution </p>
  
  <p>clicking activity</p>
  
  <pre><code> g.setOnItemClickListener(new OnItemClickListener() {
              public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id) 
              {
                  try {
                      imageid=position;
                      ((ImageView)findViewById(R.id.ImageViewlarge)).setImageResource(mImageIds[position]);
                      ((TextView)findViewById(R.id.TextViewImageName)).setText(imgNames[position]);
                       mp = MediaPlayer.create(SeaSpell.this,audioTrack[position]);
  
                          } catch (Exception e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                              }
  
                  }
              });
  </code></pre>
  
  <p>handler gallery rotation</p>
  
  <pre><code> class RefreshHandler extends Handler {
  
  
          @Override
          public void handleMessage(Message msg) {            
              SeaSpell.this.updateUI();
          }
  
          public void sleep(long delayMillis) {
  
              this.removeMessages(0);         
              if(isUpdateUI)
                  sendMessageDelayed(obtainMessage(0), delayMillis);
          }
  }
  public void updateUI(){
      try
      {
       getImages();// this method is gallery  rotation in circular manner
          mRedrawHandler.sleep(3000);
  
      }
  </code></pre>
  
  <p>how can solve this problem please send some solution  its urgent </p>