I am using GridLayout(support) for displaying ImageViews in my application. There are 3 columns and 5 rows. The problem is that the cells in the
GridLayout
ImageView
Found the solution.
Making the following changes removed the spacings.
gridLayout = (GridLayout) findViewById(R.id.gridlayout_main); gridLayout.setUseDefaultMargins(false); gridLayout.setAlignmentMode(GridLayout.ALIGN_BOUNDS); gridLayout.setRowOrderPreserved(false);
Refer to the image below.