title: Android Create Image Gallery from App Folder
body: <p>I am working on an app and one of my activities is a screen that grabs all the images in a folder I made in the /data/ application folder. I would like to to grab all the photos lay them out in a grid format and then when a person clicks on one it blows it up to full size. Of course this gallery needs to change when new images are added to the folder.</p>
  
  <p>Seems like it would be some thing simple to do but I am having some trouble implementing this I keep finding a lot of different solutions non of which seem quite right. </p>
  
  <p>I'm assuming it would be some sort of gridview/listadapter combination.</p>
  
  <p>What would the best solution to this problem?</p>
  
  <p>EDIT</p>
  
  <p>I have looked into these solutions 
  <a href="http://www.androidhive.info/2012/02/android-gridview-layout-tutorial/" rel="nofollow">http://www.androidhive.info/2012/02/android-gridview-layout-tutorial/</a>
  http://developer.android.com/guide/topics/ui/layout/gridview.html#example</p>
  
  <p>but my confusion is code like this </p>
  
  <pre><code>private Integer[] mThumbIds = {
          R.drawable.sample_2, R.drawable.sample_3,
          R.drawable.sample_4, R.drawable.sample_5,
          R.drawable.sample_6, R.drawable.sample_7,
          R.drawable.sample_0, R.drawable.sample_1,
          R.drawable.sample_2, R.drawable.sample_3,
          R.drawable.sample_4, R.drawable.sample_5,
          R.drawable.sample_6, R.drawable.sample_7,
          R.drawable.sample_0, R.drawable.sample_1,
          R.drawable.sample_2, R.drawable.sample_3,
          R.drawable.sample_4, R.drawable.sample_5,
          R.drawable.sample_6, R.drawable.sample_7
  };
  </code></pre>
  
  <p>What do I do about this since the amount of images will be constantly changing in my app folder. And how do I load the images out of that folder in the first place haha</p>