Android的ListView控件:从滚动标题到置顶变化 [英] Android ListView: Change from Scrolling Header to Sticky

查看:185
本文介绍了Android的ListView控件:从滚动标题到置顶变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能让一个ListView的滚动正常,但是当你向下滚动太多,这样它就会消失在它成为顶部固定/粘顶内的头。

How can I make a header inside a listview that scrolls normally but when you scroll down too much so that it would vanish at the top it becomes fixed/sticky at the top.

我已经加入addHeaderView头,但我想,如果你想实现什么,我形容这是不可能的。

I have added the header with addHeaderView but I suppose this isn't possible if you want to implement what I described.

如何能不能做到?

推荐答案

有一个第三方库,可以做的正是你想要在这里是什么

There is a 3rd party library that can do exactly what you want right here

<一个href="https://github.com/emilsjolander/StickyListHeaders">https://github.com/emilsjolander/StickyListHeaders

要做到这一点的能力并不在SDK

the ability to do this is not in the SDK

这篇关于Android的ListView控件:从滚动标题到置顶变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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