StickyListHeaders
StickyListHeaders copied to clipboard
Programmatically scroll to section header
Is there any way to programmatically scroll to a particular section header? I have buttons along the top of my ListView which represent the different section headers, and I want to scroll to the appropriate section upon tapping them. Is this possible?
I'm also looking for something similar to that. I've tried using "setSelection" without success
list.post(new Runnable() { @Override public void run() { list.setSelection(pos); list.clearFocus(); } });
+1! I want to use it when clicking an header in the expandable version!
Where you able to do it?
I ended up having to calculate the index/position for each header and use ListView's setSelection() method.
@codyrotwein how did you calculate the index/position for each header ?
Would smoothScrollToPositionFromTop
be something you're looking for?