Android ListView: Change from Scrolling Header to Sticky

梦想的初衷 提交于 2019-12-06 11:40:37

问题


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



来源:https://stackoverflow.com/questions/14902898/android-listview-change-from-scrolling-header-to-sticky

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!