Open KingWu opened 7 years ago
I think it depends on the data changeset. the adapter's behaviour is basically the default behavior from RecyclerView
.
You can overwrite those behavior if you want. See https://github.com/realm/realm-android-adapters/blob/master/adapters/src/main/java/io/realm/RealmRecyclerViewAdapter.java#L44
Actually in my project I used RealmRecyclerViewAdapter with header view at first time I load data from WS and update into realm. The particular scenario the recycler view scroll to bottom.
Once the data is stored into realm then it is working correctly.
Can you please check and update us ASAP ?
Hi @jayarajm Can you provide a sample project showing the behaviour?
The RealmRecyclerViewAdapter
is updated when data is updated in realm db.
Now I want to scroll to the end of the list when RealmRecyclerViewAdapter
is updated (notifyDataSetChanged()
is called by OrderedRealmCollectionChangeListener
internaly)
Edit
Found a solution add addChangeListener
to RealmResults<E>
We're having a similar issue where we're adding an item to an empty list. In this case it looks like the adapter inserts and extra row above the other rows. This results in the user not being able to see the new item in the list since it's above the current viewport.
@lam-amsiq do you know how to solve this problem? @jayarajmI have the same situation as you, had you solved it?
but I found that if I add header view for the adapter when I notify item changes should add the count of header view for start position
i load the result from realm and set realm-android-adapters. The recycler view always auto scroll to the end position.
is it default behaviour?