首页 > 其他 > 详细

Can a GridView have a footer and header just like ListView?

时间:2017-07-26 22:59:32      阅读:269      评论:0      收藏:0      [点我收藏+]

Aquick question:

In ListView I use this code:

list.addHeaderView(headerView);

How to deal with it when working on gridview?

Thanks.


There is a quite good implementation of GridView with header support in Google Photos application, as it‘s OSS code you can use it as is or take it as a reference for your own implementation:http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.3_r2.1/com/android/photos/views/HeaderGridView.java

Basic idea is quite simple - WrapperAdapter creates an fake row by increasing number of items by number of columns and then return a header view for the item.


original text:http://stackoverflow.com/questions/5790215/can-a-gridview-have-a-footer-and-header-just-like-listview

answered Jan


Can a GridView have a footer and header just like ListView?

原文:http://www.cnblogs.com/blfbuaa/p/7242127.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!