I have a list where I want to mark the checked/selected row as being sticky to prevent the selected item from scrolling out of the view. I have tried implementing https://github.com/emilsjolander/StickyListHeaders, but since it is not possible to call addHeader
after calling setAdapter
, I can not figure out how to do this dynamically (if even possible) based on when a list item is clicked (which is updated in getView
of a custom adapter adapter).
I have also looked at similar libraries, but their implementation seems to be much like the one I have already tried. The author of StickyListHeaders
is for example also the author of another similar library for ScrollView
, but this is also not what I want, since you have to add children of each header item respectively.
So basically, I need a regular ListView where the clicked (selected) item is made sticky.