title: Loading Images from SD card to ViewPager Android
body: <p>I need to Load Images from a folder in SD Card into a ViewPager. This is what i have managed so far.</p>
  
  <pre><code>public Drawable getImageFromSdCard(String imageName) {
      Drawable d = null;
      try {
          String path = Environment.getExternalStorageDirectory().toString()
                  + "/YourSubDirectory/";
          Bitmap bitmap = BitmapFactory.decodeFile(path + "/" + imageName
                  + ".png");
          d = new BitmapDrawable(bitmap);
      } catch (IllegalArgumentException e) {
          // TODO: handle exception
      }
      return d;
  
  }
  </code></pre>
  
  <p>How can i set this as a ViewPager ? </p>