enter image description hereI am new to kotlin, I am trying to work on an app that works with an embedded system trough firebase. After I made the communication with a shared view model between the activity and fragment, I tried adding the alarm data to the recycler view. I used the observe function for live data, but everytime I try to add new alarms to the alarm list it seems like the alarm created earlier is replaced by the new one. I expected a new instance for it, but I figured that the elements added to the recycler view are tied in a way to the live data
I tried introducing a flag and passing the data to a new var and then introducing but I did not succed
Antonie Suciu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.