Android在GridView中添加Header、Footer
可以使用开源项目: https://github.com/liaohuqiu/android-GridViewWithHeaderAndFooter
或是引用依赖: dependencies {compile
'in.srain.cube:grid-view-with-header-footer:1.0.12'
}
布局文件的GridView引用类中的 GridViewWithHeaderAndFooter
然后在Activity中调用 addHeaderView()、addFooterView()方法(需要在setAdapter()方法之前调用)