android - Recycler view reach on top after add some data on scroll in adapter -


enter image description here

i have added notifydatasetchange still reach @ top of recycler view if see mistake in code please reply. loading data on scrolling form server bt set in adapter on bottom reach, here veglist list contain old data newly added data.

i have seen related endless recycler view no need such type of suggestions, not fresher.

you having issue because creating new adapter each time loadmore called.

you need rewrite code this.

initialize adapter in oncreate this

vegadaper = new vegadapter(this,veglist);  recycleview.setadapter(vegadapter); 

please remove code temp arraylist creation vegadaper.notifydatasetchanged()

and change single line

  vegadaper.notifyiteminserted(veglist.size() -1);    // notify new items in veglist.. not entire view. 

also please post actual code instead of image.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -