隐藏在ListView的页眉视图 [英] Hiding the Header view in ListView

查看:146
本文介绍了隐藏在ListView的页眉视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个标题视图添加到我的清单,并隐藏这一切,除非我们滚动到它(如拉来刷新机制)的时间。现在的问题是:如果该列表不是足够高,能够填充屏幕 - 标题视图显示在列表顶部

有没有办法把它藏起来,并使其可见,只有当我们滚动到了吗?我一直在尝试了很多东西,但我不能想出一个很好的和简单的方式来做到这一点。

感谢

解决方案

下面是隐藏和显示的标题来看一个简单的方法: <一href="http://pivotallabs.com/users/joe/blog/articles/1759-android-tidbits-6-22-2011-hiding-header-views"相对=nofollow>隐藏标题景观

编辑:

请找到href="http://pivotallabs.com/android-tidbits-6-22-2011-hiding-header-views/"这里rel="nofollow"> <工作链路

I'm trying to add a header view to my list, and hide it all the time unless we scroll to it (like the pull-to-refresh mechanism). The problem is: if the list is not tall enough to fill the screen - the header view is shown on top of the list.

Is there a way to hide it, and make it visible only when we scroll to it? I've been trying a lot of stuff, but I can't figure out a good and simple way to do so.

Thanks

解决方案

Here's a simple way of hiding and showing the header view: Hiding Header Views

EDIT:

Please find the working link here

这篇关于隐藏在ListView的页眉视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆