How to remove the space between rows of grid view in android

前端 未结 8 998
猫巷女王i
猫巷女王i 2021-02-02 13:53

In android grid view there is extra space between the rows of grid view. I am not adding any space to the gridview.

here is my xml files

        

        
相关标签:
8条回答
  • 2021-02-02 14:15

    Setting android:verticalSpacing in the gridview to negative values. will remove the vertical space.

    (Eg: android:verticalSpacing="-10dp")

    test with some number to get the right value

    0 讨论(0)
  • 2021-02-02 14:25

    I got the solution for this problem.

    To solve this i need to add 1 line in my xml file

    android:adjustViewBounds="true"
    

    and after adding this. the space is not appearing now

    0 讨论(0)
提交回复
热议问题