I'm new to kotlin and I am developing an app that uses a gridview. I've managed to make the gridview work, however I want to remove the space between each row. I've tried setting padding and vertical spacing to 0dp, my listSelector is @null but nothing seems to work. What should I do to remove the vertical space between rows?
Grid View:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
<GridView
android:id="@+id/home_grid"
android:numColumns="3"
android:verticalSpacing="0dp"
android:horizontalSpacing="0dp"
android:background="@color/colorPrimary"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="top"
android:stretchMode="columnWidth"
android:listSelector="@null"
android:gravity="center"
android:paddingVertical="0dp"/>
</RelativeLayout>
Image View:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
<ImageView
android:id="@+id/grid_image"
android:layout_width="200dp"
android:layout_height="200dp"
android:adjustViewBounds="true"/>
</RelativeLayout>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…