HorizontalScrollView shrinks GridView to small line

与世无争的帅哥 提交于 2019-12-24 00:49:13

问题


When I put a HorizontalScrollView around a GridView, the GridView gets compressed into a small column on the left. The Gridview's vertical scrollbar even appears on the left. The HorizontalScrollView's width is set to fill_parent and the GridView is also fill_parent. I don't know why this is happening.

I tried setting the GridView's visibility to GONE and VISIBILE like someone recommended but it doesn't do anything. However if fastScroll is enabled on the GridView, then dragging the fast scroll tab vertically causes the GridView to expand horizontally and it keeps expanding past the last column.


回答1:


I understand now why this cannot be done. There should be a way to force the GridView to load all horizontal items and allow horizontal scrolling.

The better choice would be for them to implement some kind of DataGrid control. Most people are under the impression that GridView like a DataGrid.



来源:https://stackoverflow.com/questions/2361958/horizontalscrollview-shrinks-gridview-to-small-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!