Question

I am having trouble finding the event to bind in the ListView adapter to scroll the listview to the bottom when a new item is added. When I initially populate the list its scrolled to the bottom which is correct but on an subsequent adds to the lists via a polling service it doesn't seem to stay on the bottom and I am forced to manually scroll. I am just wondering what events I need to hook into in order to set the index or automatically scroll to the bottom.

Okay I just noticed that when I add another item it pushes up 1 so it seems 1 item is always hidden when I add a new one, not quite sure how to fix this.

Was it helpful?

Solution

After doing more research I realised the error was due to me updating the collection on a different thread. Needed to be on the UIThread.

https://github.com/MvvmCross/MvvmCross-Tutorials/blob/master/Working%20With%20Collections/Collections.Droid/Views/PolymorphicListItemTypesView.cs

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top