Horizo​​ntalScrollView 将 GridView 缩小为小行

发布于 2024-08-24 00:57:45 字数 320 浏览 3 评论 0原文

当我将 Horizo​​ntalScrollView 放在 GridView 周围时,GridView 会被压缩到左侧的一个小列中。 Gridview 的垂直滚动条甚至出现在左侧。 Horizo​​ntalScrollView 的宽度设置为 fill_parent,GridView 的宽度也设置为 fill_parent。我不知道为什么会发生这种情况。

我尝试像有人推荐的那样将 GridView 的可见性设置为 GONE 和 VISIBILE,但它没有执行任何操作。但是,如果在 GridView 上启用了快速滚动,则垂直拖动快速滚动选项卡会导致 GridView 水平扩展,并且它会不断扩展超过最后一列。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟酒忠诚 2024-08-31 00:57:45

我现在明白为什么不能这样做了。应该有一种方法可以强制 GridView 加载所有水平项目并允许水平滚动。

对他们来说更好的选择是实现某种 DataGrid 控件。大多数人的印象是 GridView 就像 DataGrid。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文