I'm adding a ImageView item to the empty GridView programmatically so when i set the height to wrap content the second row disappears.
Here's the gridview xml :
<GridView
android:id="@+id/gridView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnWidth="100dip"
android:gravity="center"
android:horizontalSpacing="10dip"
android:numColumns="2"
android:stretchMode="spacingWidthUniform"
android:verticalSpacing="10dip" />
I tried to set the hight to wrap content programmatically after adding the items but it didn't work, and i know that i can't predifine the number of rows, and i don't want to set a fixed height.
Any help ?