title: Android: how to get all folders with photos?
body: <p>I trying to make a gallery. I know how to get all photos and to show them in grid view. But can someone explain how to get and show folders(with photos)?</p>
  
  <p>i've got error after launching my apk file. look plz at my xml files, may be something wrong here???
  gridview.xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical" &gt;
      &lt;GridView
          android:id="@+id/gridView"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="top"
          android:layout_marginBottom="-10dp"
          android:layout_marginLeft="-10dp"
          android:layout_marginRight="-10dp"
          android:layout_marginTop="-10dp"
          android:horizontalSpacing="-15dp"
          android:numColumns="3"
          android:padding="0dp"
          android:verticalSpacing="-15dp" &gt;
      &lt;/GridView&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and grid_item:</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="right"
          android:layout_marginRight="2dp"
          android:layout_marginTop="2dp"
  
          android:gravity="center"
          android:scaleType="center"
           /&gt;
  </code></pre>