I have a GridView. Each cell has an ImageView and TextViews under the image. My problem is, that when there are items with different number of lines in textview, the possitions of cells are corrupted during scrolling up.
Here is a picture, where you can see it better: http://postimg.org/image/7ajl6lbv5/
My question is: How to set fixed height to all cells in row according to the cell with the highest height.
Here are my layouts:
<GridView
android:id="@+id/gvProducts"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:numColumns="auto_fit"
android:verticalSpacing="8dp"
android:horizontalSpacing="8dp"
/>
and GridItem:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/action_bar_item_background"
>
<ImageView
android:id="@+id/ivThumb"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:adjustViewBounds="true"
/>
<LinearLayout
android:id="@+id/llDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp"
>
<LinearLayout
android:id="@+id/llProductGridDesc"
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:maxLines="4"
>
<TextView
android:id="@+id/tvProductName"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:textSize="14sp"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/llProducPrice"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/tvProductPriceDiscount"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
android:paddingRight="4dp"
/>
<TextView
android:id="@+id/tvProductPrice"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>