android: smoothScrollToPosition() not working correctly

后端 未结 7 2109
心在旅途
心在旅途 2020-12-03 00:11

I\'m trying to smoothly scroll to last element of a list after adding an element to the arrayadapter associated with the listview. The problem is that it just scrolls to a r

7条回答
  •  渐次进展
    2020-12-03 01:07

    Do you call arrayadapter.notifyDataSetChanged() after you called arrayadapter.add()? Also to be sure, smoothScrollToPosition and setSelection are methods available in ListView not arrayadapter as you have mentioned above.

    In any case see if this helps: smoothScrollToPosition after notifyDataSetChanged not working in android

提交回复
热议问题