How to scrolldown/scrollup the listview automatically whenever an item is added at the end /removed from listview?
-
Hi All,
How i can scroll down listview to the end to show last item (which present at below )whenever a new item is added.similarly whenever an item removed at the end how to scroll up. -
Hi All,
How i can scroll down listview to the end to show last item (which present at below )whenever a new item is added.similarly whenever an item removed at the end how to scroll up.Hi @divaindie ,
Whenever the new item is removed, you just set the contentY of listview to zero.
listview.contentY =0; //scroll up
listview.contentY =listview.height; //scroll down whenever item is added (just assign some positive value and see the reflection)And also you can use following methods
positionViewAtBeginning()
positionViewAtEnd()this code may help you to solve your problem.