Android GridView how to occupy the full width

24 Views Asked by At

I am using the following GridView:

<GridView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/my_gridview"
    android:layout_width="match_parent"
    android:layout_height="300dp"
    android:scrollbars="vertical"
    android:numColumns="3"
    android:verticalSpacing="8dp"
    android:horizontalSpacing="8dp"
    android:stretchMode="columnWidth" />

Which results to this screen:

enter image description here

What can i do in order for the photos to occupy the full width of the GridView and avoid having this empty space on the right? (marked in red)

0

There are 0 best solutions below