In my application I would like to be able to allow the user to search the contents of a scrollable TextView with a fair bit of content in it (essentially an article). Much like the "search in page" functionality on a web browser, whereby the user enters a search term and each time they click search, they jump to the next match for that term.
The first element of that implementation, the highlighting of the search term within the article, is easy - just set a span with a background where the term is found. What I'm struggling with is how to scroll to each of these matches when the user presses "search". I've looked everywhere but can't seem to find anybody else who has tried this (but am happy to be proved wrong!) so would appreciate any guidance.
So, in summary: Given a search term, I want to scroll to each match within a TextView for that term.