How to get rid of spaces in gridview

前端 未结 4 928
长发绾君心
长发绾君心 2021-02-04 10:05

This thing has been doing my head in for a little while now and I can\'t seem to be able to solve it.

I\'ve got a grid view, in which I display a few bitmaps. I add a pa

4条回答
  •  眼角桃花
    2021-02-04 11:00

    For me it solved the problem by setting imageview.setAdjustViewBounds(true); in my Adapter class.

    It seems that my square images were automatically resized in width but Gridview still used the original hight. By adjusting bounds, both dimensions were resized automatically and all items were displayed smoothly even with default stretchmode enabled.

提交回复
热议问题