realm shows only one item from arryList kotlin
I'm using realm in my app to save some ArrayList data API, but realm only saves one Item from the data and displays it, it should save all the items not only one. here's my code for the classes.
Realm Model
@RealmClass
open class Images(
@PrimaryKey
var id: Int? = 0,
var imageUrl: String? = ""
) : RealmObject()
My Fragment
class ImagesWallpaperFragment : Fragment() {
// realm
private lateinit var realm: Realm
private lateinit var wallpapersList: ArrayList
private fun intiRealm() {...