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 6250775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:29:25+00:00 2026-05-24T13:29:25+00:00

I am creating a calendar using GridView (6 row * 8 column). Each of

  • 0

I am creating a calendar using GridView (6 row * 8 column). Each of the cells inside this matrix (6*8) is a TextView (which I create dynamically in my program).

The issue I am facing is, the 6*8 matrix is not filling the entire space available for GridView

I would like to to have the 6*8 matrix take the entire space in GridView rather than leaving some blank space b/w the matrix and the next TextView. Can some one help me on this.

Given below is the xml layout of the Gridview

<?xml version="1.0" encoding="utf-8"?>

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

    <GridView xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/gridview"
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent"
        android:numColumns="8"
        android:verticalSpacing="10dp"
        android:horizontalSpacing="10dp"
        android:gravity="center"
        android:layout_weight="1"
            />


    <TextView  
            android:id="@+id/id_worked"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Result 1 ->"
        android:layout_weight="0"
        android:textSize="20sp"
        />
</LinearLayout>

Grid View

  • 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-24T13:29:26+00:00Added an answer on May 24, 2026 at 1:29 pm

    Remove the

        android:verticalSpacing="10dp"
        android:horizontalSpacing="10dp"
    

    from the GridView element. That shoudld reduce the spacing.

    Edit: Using LinearLayout you can do this.

    <LinearLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:layout_weight="1"
    android:weightSum="6">
        <LinearLayout android:layout_width="fill_parent"
             android:layout_height="fill_parent" android:layout_weight="1">items here</LinearLayout>
        <LinearLayout android:layout_width="fill_parent"
             android:layout_height="fill_parent" android:layout_weight="1">items here</LinearLayout>
        <LinearLayout android:layout_width="fill_parent"
             android:layout_height="fill_parent" android:layout_weight="1">items here</LinearLayout>
        <LinearLayout android:layout_width="fill_parent"
             android:layout_height="fill_parent" android:layout_weight="1">items here</LinearLayout>
        <LinearLayout android:layout_width="fill_parent"
             android:layout_height="fill_parent" android:layout_weight="1">items here</LinearLayout>
        <LinearLayout android:layout_width="fill_parent"
             android:layout_height="fill_parent" android:layout_weight="1">items here</LinearLayout>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a calendar in excel. Column 1 is 01.01.2010 (dd.MM.yyyy), Column 2 is
I am trying to create a calendar using the Gallery widget. I have a
I'm creating a calendar that displays a timetable of events for a month. Each
How do I select the calendar to use when creating events using the Zend
I'm creating outlook appointments using webdav. I'm using following post body to create the
I am creating a C# program which is using a SQL database. I want
I'm creating a mobile app in which I need to show a calendar with
I'm creating a JavaScript based calendar control, which when showing a single day needs
I want to execute javascript for creating calendar using calendarDateInput.js. Is it possible to
I am creating a calendar using a HTML table. I have a problem where

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.