views:

43

answers:

1

dear friends,

i after calling notifydatasetchanged();

i want to move scroll of list to the bottom of list so that user could see last record in the listview.actually i am writing Chat module so for that purpose i need latest record at the bottom of list.

can any one guide me how to achieve this?

any help would be appriciated.

+2  A: 

Try

listView.post(new Runnable(){
  public void run() {
    listView.setSelection(listView.getCount() - 1);
  }});

The 'post' seems to be required sometime in my experience, particularly if you have very recently updated the list.

Jim Blackler