Horizo​​ntalScrollView将GridView缩小为小行 [英] HorizontalScrollView shrinks GridView to small line

查看:65
本文介绍了Horizo​​ntalScrollView将GridView缩小为小行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将Horizo​​ntalScrollView放在GridView周围时,GridView被压缩为左侧的一小列. Gridview的垂直滚动条甚至出现在左侧. Horizo​​ntalScrollView的宽度设置为fill_parent,而GridView也是fill_parent.我不知道为什么会这样.

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.

我尝试像建议的那样将GridView的可见性设置为GONE和VISIBILE,但是它什么也没做.但是,如果在GridView上启用了fastScroll,则垂直拖动快速滚动选项卡会导致GridView水平扩展,并且会一直扩展到最后一列.

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.

推荐答案

我现在理解为什么无法做到这一点.应该有一种方法可以强制GridView加载所有水平项目并允许水平滚动.

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.

更好的选择是让他们实现某种DataGrid控件.大多数人给人的印象是GridView就像DataGrid.

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.

这篇关于Horizo​​ntalScrollView将GridView缩小为小行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆