Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5846993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:39:19+00:00 2026-05-22T12:39:19+00:00

In the above code the calendar that is in the middle is actually a

  • 0

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.

the xml for the gridview is as follows:

<GridView android:id="@+id/calendar" 
          android:numColumns="7"
          android:layout_width="fill_parent" 
          android:layout_height="wrap_content">

</GridView>

thank you in advance.enter image description here

Edit:
Update twoenter image description here

There is still some spaces in right of calendar.How to remove it?

Edit:
Update 3

<LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:layout_above="@id/menuoptions">
    <RelativeLayout style="@style/widescreen"
        android:background="@drawable/top_header">
        <ImageView style="@style/compactview" android:src="@drawable/banner1"
            android:layout_marginLeft="5dip" android:id="@+id/bannerview"
            android:layout_centerVertical="true"></ImageView>
        <ImageView style="@style/compactview" android:src="@drawable/logo"
            android:layout_marginRight="20dip" android:layout_alignParentRight="true"></ImageView>
    </RelativeLayout>
    <LinearLayout style="@style/widescreen"
        android:background="#ffffff" android:orientation="vertical">
        <LinearLayout style="@style/widescreen"
            android:background="#ffffff" android:orientation="horizontal">
            <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"></Button>
            <Button style="@style/compactview" android:background="@drawable/tag"
                android:onClick="dayButtonClicked" android:id="@+id/daybutton"
                android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button>
            <Button style="@style/compactview" android:background="@drawable/monat"
                android:id="@+id/monthbutton" android:onClick="monthButtonClicked"
                android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button>
            <Button style="@style/compactview" android:background="@drawable/jahr"
                android:id="@+id/yearbutton" android:onClick="yearButtonClicked"
                android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button>
            <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"></Spinner>
        </LinearLayout>
    </LinearLayout>

    <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">

        <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">
        </ImageView>
        <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">
        </Button>
        <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">
        </ImageView>
    </LinearLayout>
    <ViewFlipper android:id="@+id/mainflipper" style="@style/compactview">
        <LinearLayout android:id="@+id/calendartab" style="@style/compactview"
            android:orientation="vertical">
            <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">
            </GridView>
            <ListView android:id="@+id/eventlist" style="@style/widescreen">
            </ListView>
        </LinearLayout>
        <LinearLayout android:id="@+id/daytab" style="@style/compactview"
            android:orientation="vertical">
            <LinearLayout style="@style/compactview"
                android:background="@drawable/calenderheader">
                <EditText style="@style/compactview" android:id="@+id/searchkeyword"
                    android:hint="Suche" android:inputType="text"
                    android:layout_marginLeft="5dip" android:minWidth="200dip">
                </EditText>
                <Button android:onClick="searchingButtonClicked"
                    android:background="@drawable/abbrechen"
                    android:layout_marginLeft="5dip" style="@style/compactview"
                    android:layout_gravity="center_vertical|right"></Button>
            </LinearLayout>
            <ListView android:id="@+id/daylisting" style="@style/compactview"></ListView>
        </LinearLayout>
        <LinearLayout android:id="@+id/monthtab" style="@style/compactview"
            android:orientation="vertical">
            <LinearLayout style="@style/compactview"
                android:background="@drawable/calenderheader">
                <EditText style="@style/compactview" android:id="@+id/searchkeyword"
                    android:hint="Suche" android:inputType="text"
                    android:layout_marginLeft="5dip" android:minWidth="200dip">
                </EditText>
                <Button android:onClick="searchingButtonClicked"
                    android:background="@drawable/abbrechen"
                    android:layout_marginLeft="5dip" style="@style/compactview"
                    android:layout_gravity="center_vertical|right"></Button>
            </LinearLayout>
            <ListView android:id="@+id/monthlisting" style="@style/compactview"></ListView>
        </LinearLayout>
        <LinearLayout android:id="@+id/yeartab" style="@style/compactview"
            android:orientation="vertical">
            <LinearLayout style="@style/compactview"
                android:background="@drawable/calenderheader">
                <EditText style="@style/compactview" android:id="@+id/searchkeyword"
                    android:hint="Suche" android:inputType="text"
                    android:layout_marginLeft="5dip" android:minWidth="200dip">
                </EditText>
                <Button android:onClick="searchingButtonClicked"
                    android:background="@drawable/abbrechen"
                    android:layout_marginLeft="5dip" style="@style/compactview"
                    android:layout_gravity="center_vertical|right"></Button>
            </LinearLayout>
            <ListView android:id="@+id/yearlisting" style="@style/compactview"></ListView>
        </LinearLayout>
    </ViewFlipper>
</LinearLayout>
</RelativeLayout>

Compact view is width and height set to wrap_content

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:39:20+00:00Added an answer on May 22, 2026 at 12:39 pm

    Please see the Update2 part of this answer.
    @Shekhar had the same problem, and in that update you can find

    • the reason why the padding appears,
    • the solution how to avoid it.

    I hope you can work it out!

    Update:
    You might also want to specify the strechMode for your GridView so the columns to stretch equally within the parent layout:

    <GridView [...] android:stretchMode="columnWidth" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

int main(void) { std::string foo(foo); } My understanding is that the above code uses
In chrome I'm encountering the above error that blocks the browser from pulling calendar
In the above code, I am appending a javascript onclick method to the image
Directory.GetFiles(targetDirectory); Using the above code we get the names( i.e full path) of all
function moveAround(){ $('p').append($('#div')); } Above code will move div after p element as a
include 'header.php'; // ... some code header('Location:index.php'); exit; The above code keeps giving me
@Column(name=DateOfBirth) private Date dateOfBirth; I specifically need the above code to create a column
scrollPosition = window.frames[id].document.body.scrollTop; The above code doesn't work correctly. Please tell me how to
http://php.net/manual/en/mysqli.init.php $ConnectionResource = mysqli::init(); The above code fails with: Fatal error: Non-static method mysqli::init()
if(lyricsId == areleased.trackId) { ----------; ----------; } when i am working with above code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.