If you would like to after you have updated by listAdapter, you want to make sure that the list is scrolled all the way to the bottom,
so that it displays the last element entered in the list. You can do this .
方法一:
代码中给你的listView,然后添加下面的代码
mListView.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
方法二:
在你的布局文件中找到listview添加下面的属性
android:transcriptMode="alwaysScroll"
方法三:
如果上面的两个方法都失败了,就用下面的方法
您可以手动设置滚动列表,通过设置列表选择最后一行.
private void scrollMyListViewToBottom() { myListView.post(new Runnable() { @Override public void run() { // Select the last row so it will scroll into view... myListView.setSelection(myListAdapter.getCount() - 1); } }); }