I am listening to an emit from a live data and want to loop through the list to Log them. if I do myList.toString(), I can see all 10 elements of the list. But my loop stops after logging two elements:
myLiveData.observe(this, Observer {
val items : List<Items> = it
Log.i("TAG", "${items.toString()}") // shows all 10 items correctly
//log each item
for(i: Item in items){
Log.i("TAG", i.code)
}
// above loop shows the first two items only.
})
how can I loop all the items that I got through the observable?