title: How to pause a few seconds
body: <p>I want to display images like a slideshow but I can't make it pause for 5 seconds before displaying the next image...</p>
  
  <p>I have tried to make the thread sleep but it paused for 15 seconds and displayed the last (3rd) image.</p>
  
  <pre><code>for (int i = 0; i &lt; 3; i++) {
      File imgFile = new File(paths[i]);
  
      if(imgFile.exists()){
          Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
          mimage.setImageBitmap(myBitmap);
      }
  
      //**I want the thread pause for 5 seconds here**
  }
  </code></pre>