how to enable progress bar while loading custom listview in android

view story

http://stackoverflow.com – I need to maintain 3000 list items in listview(android) .But continue scrolling will make error. To manage this I plan to show progress dialog while loading the listview. Please suggest me how to do it in android. (HowTos)