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?的更多相关文章

  1. LISTVIEW嵌套GRIDVIEW的一些处理(点击GRIDVIEW的条目,能够显示他在LISTVIEW中的位置)(对这篇文章的优化处理,不每次都new onItemClickListener)

    前几天写了点击GRIDVIEW的条目,能够显示他在LISTVIEW中的位置,当时的处理是在ListView的适配器里的GetView方法里每次都new GridView的onItemClickList ...

  2. html-5 --html5教程article、footer、header、nav、section使用

    header header元素是一种具有引导和导航作用的辅助元素.通常,header元素可以包含一个区块的标题(如h1至h6,或者hgroup元素标签),但也可以包含其他内容,例如数据表格.搜索表单或 ...

  3. GridView、DataGrid、DataList、Repeater、ListView、DetailsView、FormView

    列表类   GridView 控件   GridView 控件以表的形式显示数据,并提供对列进行排序.分页.翻阅数据以及编辑或删除单个记录的功能.   特征:一行一条记录,就像新闻列表一样:带分页功能 ...

  4. Header,Tab,ListView三个在线性布局中,ListView向上滑动时,Tab标签悬停在顶部,然后Header向上滑出去,这个效果的做法

    效果如图: 这个效果可以用一个框架来做,首先在网上搜关键字,然后搜索的结果在这里:http://stackoverflow.com/questions/20906964/viewpager-with- ...

  5. easy Html5 - Jquery Mobile之ToolBars(Header and Footer)

    jquery 在web js框架上的风暴还在继续却也随着移动终端走向了mobile:那么jquery mobile到底包括些什么呢 简介工具栏是在移动网站和应用中的头部,尾部或者内容中的工具条:Jqu ...

  6. RecyclerView添加Header和Footer

    使用过RecyclerView的同学就知道它并没有添加header和footer的方法,而ListView和GirdView都有,但是开发过程中难免有需求需要添加一个自定义的header或者foote ...

  7. WPF ListView 使用GridView 带有Header 以及点击header排序 sort

    ListView: <ListView x:Name="lvFiles" VerticalAlignment="Stretch" Background=& ...

  8. [Android Bug] ListView中Header, Footer无法隐藏(gone)的问题

    ListView中Header.Footer View应该是会应该遇到, 比如说,滚动到底部时,自动开始加载: 对于一些应用市场,会在Header中加上ViewFlipper做应用推荐(滚动的那种,好 ...

  9. GridView 和DataGrid区别

    转自:http://blog.csdn.net/51357/article/details/1480599 近期在维护一个vs2008开发的项目(该项目是从Vs2013拷贝升级过来的),发现不同时期按 ...

随机推荐

  1. MPchartAndroid-柱状图

    mChart = (LineChart) findViewById(R.id.chart1); mChart.setDescription("");    //设置图表描述信息 m ...

  2. hdu 1573(中国剩余定理)

    X问题 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...

  3. sprak 环境搭建的坑

    1,/etc/hosts下的ip master/slave 的对照 /etc/sysconfig/network 配置: NETWORKING=yes HOSTNAME=master 以及spark/ ...

  4. CoreData: 如何预载/导入已有的数据

    原文地址:CoreData: 如何预载/导入已有的数据作者:出其东门 在系列教程一中,我们为对象建立了可视化数据模型,运行了快速肮脏测试并勾在一个表视图(table view)中来显示.而在这个教程, ...

  5. 【java】Java中十六进制转换 Integer.toHexString()到底做了什么?什么时候会用到它?为什么要用它?byte为什么要&0xff?为什么要和0xff做与运算?

    参考地址:http://www.cnblogs.com/think-in-java/p/5527389.html 参考地址:https://blog.csdn.net/scyatcs/article/ ...

  6. Fatal error: Call to a member function read() on a non-object in

    是你的路径出问题了系统 > 系统基本参数 > 站点设置 里面的<站点根网址:和 网页主页链接:>系统 > 系统基本参数 > 核心设置 <DedeCMS安装目录 ...

  7. TOYS-POJ2318

    本题主要是确定给定的点在那块区域.原题给出n条直线,将长方形分为n+1快区域.我们可以对每个给定的点来判断它在那块区域,判段方法可以根据点与直线的位置关系,具体如下,对于点(x0,y0)和直线ax+b ...

  8. sublimetext3打造pythonIDE

    虽然pycharm是非常好用的pythonIDE,用来开发项目很方便,但是修改调整单个或几个小程序就显得很笨重,这时候我们可以选择使用sublime. 一般来说要开发项目我都用pycharm,开发简单 ...

  9. python 工具 字符串转numpy浮点数组

    不同的数字之间使用 空格“ ”,“$”,"*"等隔开,支持带小数点的字符串NumArray=str2num(LineString,comment='#')将字符串中的所有非Doub ...

  10. C#自定义MessageBox 按钮的Text

    运行效果: 代码: using System; using System.Drawing; using System.Runtime.InteropServices; using System.Tex ...