Maintain scroll position when adding to ListView with reverse endless-scrolling

后端 未结 4 1812
不知归路
不知归路 2021-02-05 10:38

I am building a chat-like Android application, similar to Hangouts. For this purpose I am using a vertical ListView with stackFromBottom=true and transcriptMo

4条回答
  •  再見小時候
    2021-02-05 10:46

    after you insert the record in your adapter you can try to use

       yourListView.setSelection(yourAdapter.getCount() - 1);
    

提交回复
热议问题