I have different colors for different lines in the ListView, by setting the color of textbox depending on the line number (in getView() of Adapter). Now when I manually scro
ListView#scrollTo doesn't scroll the list contents. (It's a standard View method, and not specific to lists at all: it scrolls the ListView view itself.)
Instead, try using ListView#setSelectionFromTop(0, int y) to scroll.
API 19+ has a ListView#scrollListBy(int y) method if you're programming for KitKat and up.