将页脚视图添加到 Android 中的多列 GridView? [英] Adding a footer View to a multi-column GridView in Android?
问题描述
是否可以将页脚视图添加到行为类似于 ListView 的页脚的 GridView(具有多列)?那么这个footer View(例如pager view)只有在用户滚动到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?
推荐答案
不,抱歉,GridView
不提供这种功能.
No, sorry, GridView
does not offer this sort of capability.
您提到将其用于寻呼机视图".如果您的意思是单击此处查看更多"条目,那么一旦到达当前网格数据的末尾,我就会延迟加载数据.我的 EndlessAdapter
处理了这个问题,虽然我还没有用 GridView
,它可能会工作——至少,我认为应该.
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 with GridView
, it may work -- leastways, I think it should.
这篇关于将页脚视图添加到 Android 中的多列 GridView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!