Grid view not covering?
<p>In the above code the calendar that is in the middle is actually a gridview. As you can see it is not covering the whole space and there is a black background that is visible. How do i stretch the columns or rows so that there is not black space present.</p>

<p>the xml for the gridview is as follows:</p>

<pre><code>&lt;GridView android:id="@+id/calendar" 
          android:numColumns="7"
          android:layout_width="fill_parent" 
          android:layout_height="wrap_content"&gt;

&lt;/GridView&gt;
</code></pre>

<p>thank you in advance.<img src="http://i.stack.imgur.com/oIAnc.png" alt="enter image description here"></p>

<p>Edit:
Update two<img src="http://i.stack.imgur.com/mMOem.png" alt="enter image description here"></p>

<p>There is still some spaces in right of calendar.How to remove it?</p>

<p>Edit:
Update 3
    
    
    
        
        
        
        
    </p>

<pre><code>&lt;LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:layout_above="@id/menuoptions"&gt;
    &lt;RelativeLayout style="@style/widescreen"
        android:background="@drawable/top_header"&gt;
        &lt;ImageView style="@style/compactview" android:src="@drawable/banner1"
            android:layout_marginLeft="5dip" android:id="@+id/bannerview"
            android:layout_centerVertical="true"&gt;&lt;/ImageView&gt;
        &lt;ImageView style="@style/compactview" android:src="@drawable/logo"
            android:layout_marginRight="20dip" android:layout_alignParentRight="true"&gt;&lt;/ImageView&gt;
    &lt;/RelativeLayout&gt;
    &lt;LinearLayout style="@style/widescreen"
        android:background="#ffffff" android:orientation="vertical"&gt;
        &lt;LinearLayout style="@style/widescreen"
            android:background="#ffffff" android:orientation="horizontal"&gt;
            &lt;Button style="@style/compactview" android:background="@drawable/kalenderhover"
                android:layout_marginLeft="3dip" android:onClick="calendarButtonClicked"
                android:id="@+id/calendarbutton" android:layout_marginTop="6dip"
                android:layout_marginBottom="5dip"&gt;&lt;/Button&gt;
            &lt;Button style="@style/compactview" android:background="@drawable/tag"
                android:onClick="dayButtonClicked" android:id="@+id/daybutton"
                android:layout_marginTop="6dip" android:layout_marginBottom="5dip"&gt;&lt;/Button&gt;
            &lt;Button style="@style/compactview" android:background="@drawable/monat"
                android:id="@+id/monthbutton" android:onClick="monthButtonClicked"
                android:layout_marginTop="6dip" android:layout_marginBottom="5dip"&gt;&lt;/Button&gt;
            &lt;Button style="@style/compactview" android:background="@drawable/jahr"
                android:id="@+id/yearbutton" android:onClick="yearButtonClicked"
                android:layout_marginTop="6dip" android:layout_marginBottom="5dip"&gt;&lt;/Button&gt;
            &lt;Spinner style="@style/compactview" android:id="@+id/category_name"
                android:background="@drawable/categoriahover"
                android:layout_marginLeft="5dip" android:layout_marginTop="7dip"
                android:layout_marginBottom="4dip"&gt;&lt;/Spinner&gt;
        &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:background="@drawable/calenderheaderwithoutarrow"
        android:id="@+id/calendarheader"&gt;

        &lt;ImageView android:id="@+id/prevMonth" android:src="@drawable/left_arrow"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:layout_marginLeft="10dip" android:layout_marginTop="5dip"&gt;
        &lt;/ImageView&gt;
        &lt;Button android:id="@+id/currentMonth" android:layout_weight="0.6"
            android:textColor="#FFFFFF" android:textAppearance="?android:attr/textAppearanceMedium"
            android:background="@android:color/transparent"
            android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;
        &lt;/Button&gt;
        &lt;ImageView android:layout_marginRight="10dip" android:id="@+id/nextMonth"
            android:src="@drawable/right_arrow" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:layout_marginTop="5dip"&gt;
        &lt;/ImageView&gt;
    &lt;/LinearLayout&gt;
    &lt;ViewFlipper android:id="@+id/mainflipper" style="@style/compactview"&gt;
        &lt;LinearLayout android:id="@+id/calendartab" style="@style/compactview"
            android:orientation="vertical"&gt;
            &lt;GridView android:id="@+id/calendar" android:numColumns="7"
                android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:listSelector="@drawable/datecell"
                android:layout_marginRight="0dip" android:paddingRight="0dip"&gt;
            &lt;/GridView&gt;
            &lt;ListView android:id="@+id/eventlist" style="@style/widescreen"&gt;
            &lt;/ListView&gt;
        &lt;/LinearLayout&gt;
        &lt;LinearLayout android:id="@+id/daytab" style="@style/compactview"
            android:orientation="vertical"&gt;
            &lt;LinearLayout style="@style/compactview"
                android:background="@drawable/calenderheader"&gt;
                &lt;EditText style="@style/compactview" android:id="@+id/searchkeyword"
                    android:hint="Suche" android:inputType="text"
                    android:layout_marginLeft="5dip" android:minWidth="200dip"&gt;
                &lt;/EditText&gt;
                &lt;Button android:onClick="searchingButtonClicked"
                    android:background="@drawable/abbrechen"
                    android:layout_marginLeft="5dip" style="@style/compactview"
                    android:layout_gravity="center_vertical|right"&gt;&lt;/Button&gt;
            &lt;/LinearLayout&gt;
            &lt;ListView android:id="@+id/daylisting" style="@style/compactview"&gt;&lt;/ListView&gt;
        &lt;/LinearLayout&gt;
        &lt;LinearLayout android:id="@+id/monthtab" style="@style/compactview"
            android:orientation="vertical"&gt;
            &lt;LinearLayout style="@style/compactview"
                android:background="@drawable/calenderheader"&gt;
                &lt;EditText style="@style/compactview" android:id="@+id/searchkeyword"
                    android:hint="Suche" android:inputType="text"
                    android:layout_marginLeft="5dip" android:minWidth="200dip"&gt;
                &lt;/EditText&gt;
                &lt;Button android:onClick="searchingButtonClicked"
                    android:background="@drawable/abbrechen"
                    android:layout_marginLeft="5dip" style="@style/compactview"
                    android:layout_gravity="center_vertical|right"&gt;&lt;/Button&gt;
            &lt;/LinearLayout&gt;
            &lt;ListView android:id="@+id/monthlisting" style="@style/compactview"&gt;&lt;/ListView&gt;
        &lt;/LinearLayout&gt;
        &lt;LinearLayout android:id="@+id/yeartab" style="@style/compactview"
            android:orientation="vertical"&gt;
            &lt;LinearLayout style="@style/compactview"
                android:background="@drawable/calenderheader"&gt;
                &lt;EditText style="@style/compactview" android:id="@+id/searchkeyword"
                    android:hint="Suche" android:inputType="text"
                    android:layout_marginLeft="5dip" android:minWidth="200dip"&gt;
                &lt;/EditText&gt;
                &lt;Button android:onClick="searchingButtonClicked"
                    android:background="@drawable/abbrechen"
                    android:layout_marginLeft="5dip" style="@style/compactview"
                    android:layout_gravity="center_vertical|right"&gt;&lt;/Button&gt;
            &lt;/LinearLayout&gt;
            &lt;ListView android:id="@+id/yearlisting" style="@style/compactview"&gt;&lt;/ListView&gt;
        &lt;/LinearLayout&gt;
    &lt;/ViewFlipper&gt;
&lt;/LinearLayout&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p><strong>Compact view is width and height set to wrap_content</strong></p>
