title: GridView layout like Android 4.0 Gallery
body: <p>I'm trying to use the GridView to create an image gallery index that will look similar to the Ice Cream Sandwhich gallery app:</p>
  
  <p><a href="http://www.techdron.com/wp-content/uploads/2011/10/sw_albums.jpg" rel="nofollow">http://www.techdron.com/wp-content/uploads/2011/10/sw_albums.jpg</a></p>
  
  <p>(Sorry I can't use the img tag yet)</p>
  
  <p>I'm looked at all of the common tutorials (e.g. <a href="http://developer.android.com/resources/tutorials/views/hello-gridview.html" rel="nofollow">http://developer.android.com/resources/tutorials/views/hello-gridview.html</a>) and none of them really give me what I'm looking for.</p>
  
  <p>Right now I have the following: </p>
  
  <pre><code>&lt;GridView xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/gridview"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:columnWidth="100dp"
  android:numColumns="auto_fit"
  android:verticalSpacing="2dp"
  android:horizontalSpacing="2dp"
  android:stretchMode="none"
  android:gravity="center"
  android:layout_weight="1"
  android:background="#000000"/&gt;
  </code></pre>
  
  <p>And I am creating my views in the adapter like so:</p>
  
  <pre><code>imageView = new ImageView(mContext);
  imageView.setLayoutParams(new GridView.LayoutParams(148,148));
  imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
  </code></pre>
  
  <p>It's close but the feeling really isn't the same, and I'm not sure that it will scale well on all devices. Does anyone know of a way to use the GridView like this? Or should I be looking at using another widget, e.g. the <a href="http://developer.android.com/reference/android/widget/GridLayout.html" rel="nofollow">GridLayout</a>.</p>
  
  <p>Thanks.</p>