applidium / HeaderListView

Android ListView with sticky headers
http://applidium.com/en/news/headerlistview_for_android/
Other
313 stars 96 forks source link

Programmatically scroll to section header #41

Closed codyrotwein closed 9 years ago

codyrotwein commented 9 years ago

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?

dimitrireef commented 9 years ago

did you find a solution for this issue ?

codyrotwein commented 9 years ago

Not yet.

On Mon, Jan 12, 2015 at 4:32 AM, dimitrireef notifications@github.com wrote:

did you find a solution for this issue ?

— Reply to this email directly or view it on GitHub https://github.com/applidium/HeaderListView/issues/41#issuecomment-69545530 .

tokou commented 9 years ago

Hello,

You should call #smoothScrollToPosition(int) or #setSelection(int) on the underlying ListView while passing numberOfCellsBeforeSection(int section) as argument.