to much space between images in gallery android
<p>Hello i have an activity that loads lots of images from the drawable folder, and put them in a gallery view from an Adapter. The problem is that there's too much space between this images. </p>

<p><strong>Here's the getView i use:</strong></p>

<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
        if(convertView == null) { 
            convertView = new ImageView(mContext);
            convertView.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        }
        ImageView iv = (ImageView) convertView;
        iv.setImageResource(mThumbIds[position]);
        return convertView;
    }
</code></pre>

<p><strong>Here is my xml layout:</strong></p>

<pre><code>&lt;Gallery android:id="@+id/gallery"
        android:background="#000000"
        android:layout_width="wrap_content"
        android:layout_height="100dp"
        android:layout_alignParentBottom="true"
    /&gt;
</code></pre>

<p>Is there any way i can get the images to be next to each other without having to create a new view for every image?</p>

<p>Best Regards. </p>
