android - Recycler view reach on top after add some data on scroll in adapter -
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
Post a Comment