1

android gridview with contents inflated from xml has each row taking entire screen

view story
linux-howto

http://stackoverflow.com – I have a Gridview in Android where each element is inflated from xml and contains a LinearLayout holding an ImageView and a TextView. The GridView uses a custom Adapter which extends BaseAdapter. What I see is that each row rather than being just high enough to hold the largest element, is as tall as the screen. Here is the relevant code: The gridview's xml: <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ConSoul" android:layout_width="fill_parent" android:layout_height="fill_parent" android:numColumns="auto_fit" android:columnWidth="160dp (HowTos)