ensure visible on android listview?

CodeFusionMobile picture CodeFusionMobile · Jan 1, 2010 · Viewed 24k times · Source

Is there a way that I can makle sure a given item in an android listview is entirely visible?

I'd like to be able to programmatically scroll to a specific item, like when I press a button for example.

Answer

Christopher Orr picture Christopher Orr · Jan 1, 2010

ListView.setSelection() will scroll the list so that the desired item is within the viewport.