添加一个页脚视图在Android的多列的GridView?视图、Android、GridView

2023-09-05 10:04:26 作者:گق༄獨儛༄

是否有可能增加一个页脚视图到一个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?

推荐答案

没有,对不起,的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.