在Android中向多列GridView添加页脚视图?
是否可以将页脚视图添加到 GridView(具有多列),其行为类似于 ListView 的页脚?那么这个页脚视图(例如分页视图)仅在用户滚动到 GridView 底部时出现,并且它具有整个屏幕的宽度,而不仅仅是 1 个网格元素?
Is it possible to add a footer View to a GridView (which has multiple columns) that behaves like a footer of a ListView? So this footer View (e.g. a pager view) appears only when the user scrolls to the bottom of the GridView, and it has the width of the whole screen, not only 1 grid element?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,抱歉,
GridView
不提供此类功能。您提到将其用于“寻呼机视图”。如果您的意思是“单击此处获取更多”条目,那么一旦到达当前网格数据的末尾,我就会延迟加载数据。我的
EndlessAdapter
可以处理这个问题,虽然我还没有尝试过 < code>GridView,它可能会起作用——至少,我认为它应该起作用。No, sorry,
GridView
does not offer this sort of capability.You mention using this for a "pager view". If, by that, you mean a "click here for more" entry, I'd just lazy-load the data once the end of the current grid data is reached. My
EndlessAdapter
handles that, and while I have not tried it withGridView
, it may work -- leastways, I think it should.在 gridview 适配器中,您可以执行以下操作:
编辑
抱歉,我没有阅读最后一部分
In the gridview adapter you can do this:
EDIT
Sorry I did not read the last part