Search code examples
androidlistviewsimplecursoradapter

how to maintain scroll position of ListView when database data change


I am making chat view which contains plain and image messages..I am using ListView and costumised CursorAdapter .My problem is when anything change in database like updating seen ,sent or delivered status ListView just scroll position to bottom.how to keep position same.Thanks


Solution

  • I solve the problem by removing the following line from ListView attribute
    android: transcriptMode="alwaysScroll"