Android ListView: Change from Scrolling Header to Sticky

android, listview, scroll, sticky

Solution

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

Problem

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?

Original source