See attached screenshot where I am attempting to reduce the space between the columns in my GridView.
My main.xml is as follows:
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
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.