RealmList of String Type in Android

泄露秘密 提交于 2019-12-04 23:46:52

Realm version 4.0.0 will add support for RealmList that can contain String, byte[], Boolean, Long, Integer, Short, Byte, Double, Float and Date values.

Please refer to this pull request:

https://github.com/realm/realm-java/pull/5031

And the realm changelog:

https://github.com/realm/realm-java/blob/master/CHANGELOG.md

Christian Melchior

RealmLists doesn't support simple strings yet. so you have to wrap each String into its own object:

You can see a work-around here: Gson deserialization of List<String> into realmList<RealmString>

or here: https://realm.io/docs/java/latest/#primitive-lists

yes it is limitation from realm, you can't create array or list of strings, Please refer to the following link

https://github.com/realm/realm-java/issues/575

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!