Android 网格视图滚动
我想实现一个带有大量滚动图标的网格视图。
我现在已经完成了该部分,我想以这样的方式实现滚动:首先我的屏幕显示前 6 个图标,当我滚动时它显示接下来的 6 个图标(即前面的图标不应该可见)。简而言之,希望我的网格视图看起来像 Android 主屏幕菜单网格。
I want to implement a grid view with a lot of icons with scrolling.
I have done that part now I want to implement the scrolling in such a way that firstly my screen shows first 6 icons and when I scroll it shows the next 6 icons (i.e the previous icons should not be visible). In short want my grid view to look like the Android home screen menu grid.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。现在我明白了。
我认为您可以使用包含所有
gridviews
的viewflipper
。例如,viewflipper
可以在轻弹中浏览不同的gridview
。但是,我会意识到您添加了多少
gridviews
。我不熟悉 viewflipper 如何膨胀视图。在最坏的情况下,您将立即膨胀所有gridview
。Ok. Now i understand.
I think you could use a
viewflipper
that contains all yourgridviews
. Theviewflipper
could go through the differentgridviews
on a flick, for instance.However, i would be conscious of how many
gridviews
you are adding. I am not familiar with how theviewflipper
inflates views. In the worst case, you'll be inflating all thegridviews
at once.