Reputation: 4662
I want use RealmList
in a RealmBaseAdapter
but it only accepts RealmResult
.
How can I convert RealmList
to a RealmResult
?
Upvotes: 1
Views: 304
Reputation: 20126
Currently you would have to do something like this
realmList.where().findAll()
However we want to add a shared interface between the two making this easier. You can follow progress on that here: https://github.com/realm/realm-java/issues/1363
Edit: From Realm Java 3.0.0 and Realm Android Adapters 2.0.0, this is no longer an issue, and RealmBaseAdapter
works for both RealmList
and RealmResults
.
Upvotes: 3