title: take images in a folder into an array
body: <p>In my android project, I have had to <strong>store images from the <em>sd</em> card in to an <em>array</em></strong>. I can filter and get all the images in the folder. But what i really need to do is <strong>filter and get some specific images</strong> instead of all the images. My code segment is,</p>
  
  <pre><code>File[] imagelist = filePath.listFiles(new FilenameFilter(){  
              public boolean accept(File dir, String name)  {  
                  return ((name.endsWith(".jpg"))||(name.endsWith(".png")));
              }  
          });
  </code></pre>
  
  <p>So, can someone help me with some helpful code segment. Thank you!</p>