Android ListView: Change from Scrolling Header to

2019-04-13 00:36发布

问题:

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.

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

How can it be done?

回答1:

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

https://github.com/emilsjolander/StickyListHeaders

the ability to do this is not in the SDK