GridView 没有addFooterView

GridView 没有addFooterView,用第三方 GridViewWithHeaderAndFooter 

使用方法:

GridViewWithHeaderAndFooter gridView = (GridViewWithHeaderAndFooter) v.findViewById(R.id.ly_image_list_grid);

LayoutInflater layoutInflater = LayoutInflater.from(this);
View headerView = layoutInflater.inflate(R.layout.test_header_view, null);
View footerView = layoutInflater.inflate(R.layout.test_footer_view, null);
gridView.addHeaderView(headerView);
gridView.addFooterView(footerView);

下载地址:

https://github.com/liaohuqiu/android-GridViewWithHeaderAndFooter

猜你喜欢

转载自blog.csdn.net/fangjingjingll/article/details/80294192