Currently I am trying to use GridView to create a list of images with a textview beneath them, the layout should fit as many of them width wise as possible.
When using GridView with:
<GridView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/gridView"
android:numColumns="auto_fit"
android:layout_gravity="center_horizontal|top"
android:clickable="false"
/>
The expected behaviour would be that the columns would automatically wrap the content and fit as many items width wise as possible?
The textview inside the grid item layout are set to wrap_content except the ImageView, it has a static width of 75dip.
I am seeing the following layout with this code:
XX
XX
XX
If the column width is specifically set, I can easily get:
XXXX
XXXX
XXXX