更新时间:2023-11-17 17:37:52
您可以尝试把的GridView
在 HorizontalScrollView
。你可以尝试设置固定高度的的GridView
在 HorizontalScrollView
。
You can try putting the GridView
in a HorizontalScrollView
. You may try to set fixed height to the GridView
inside the HorizontalScrollView
.
然后就可以动态地计算出的GridView
根据您的内容,并使用 setNumColumns(INT)
的列数>方法来设置它。
Then you can dynamically calculate the number of columns of the GridView
based on your content and use setNumColumns(int)
method to set it.