0

I have this cell item:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView android:id="@+id/titleText" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="50dp"
    android:background="#AA000000" 
    android:gravity="center"
    android:textColor="#FFFFFF"/>

 </LinearLayout>

and this GridView:

<GridView android:id="@+id/gridView"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:numColumns="auto_fit"
    android:gravity="center"
    android:columnWidth="100dp"
    android:layout_weight="1"/>

I want to set linear layout's background image but, according to image size, I get different heigths for cells (I use different images) which is not very good looking...how can I stretch the background to a fixed heigth? Unfortunately gridview seems not have a columnHeigth attribute...

user1610075
  • 1,583
  • 3
  • 15
  • 32

1 Answers1

0

Solved thanks to chet 's advice: I set heigth and width of linear layout.

Community
  • 1
  • 1
user1610075
  • 1,583
  • 3
  • 15
  • 32