not working for dynamic data in listview. as ur only calculating indexes which are available when ur setting the adapter.