Question: See attached screenshot where I am attempting to reduce the space between the columns in my GridView.

My main.xml is as follows:

```
<?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"
>
<GridView 
android:id="@+id/gridview"
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:stretchMode="columnWidth"
android:gravity="center"
/>
<LinearLayout 
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
    <ImageView 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/logo"/>
    <TextView
    android:text="@string/game_score"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_gravity="center"/>
</LinearLayout>
</LinearLayout>

```

I am creating the ImageViews in my code from a Bitmap. However, I am not specifying any padding or spacing or otherwise.

How can I reduce this space between columns? I've tried a variety of settings on both GridViews and ImageViews but with no luck

Image is ![here](https://i.stack.imgur.com/LxYvC.jpg): 

Thanks

Answer: 
I was having similar issue of having slight horizontal spacing between the columns in few devices. ( I did not required any space. ) I was properly calculating the grid item width by dividing it with total width. I was getting this issue only on Lenovo devices.

following code was in activity related to grid.

```
int myRequestedColumnWidth = myGridViewContentMain.getRequestedColumnWidth();

Point size = new Point();
getWindowManager().getDefaultDisplay().getSize( size );
int width = size.x;
int height = size.y;

int myGridColumns = width / myRequestedColumnWidth;

if ( myGridColumns == 0 || myGridColumns == 1 )
    myGridColumns = 2;
myColumnWidth = ( width / myGridColumns );

myGridViewContentMain.setNumColumns(myGridColumns);

```

following code was in layout xml for grid

```
<GridView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/gridViewContentMain"
    android:layout_centerHorizontal="true"
    android:numColumns="2"
    android:columnWidth="200dp"
    android:verticalSpacing="0dp"
    android:layout_below="@+id/relativeLayoutMainHeader"
    android:layout_above="@+id/relativeLayoutProgressBar"
    />

```

I was unable to solve issue after changing stretch mode values.

But following value in layout xml for GridView did the trick.

```
    android:horizontalSpacing="0dp"

```

I hope, someone like me may find this helpful.

Regards.
You can reduce the space b/w column by setting the android:horizontalSpacing="-10dp" ( some negative number )