I have list of addresses in the Firebase Database. It is retrieved like this:
addressesRef
.addListenerForSingleValueEvent(object : ValueEventListener {
override fun onDataChange(snapshot: DataSnapshot) {
if (snapshot.exists()) {
//Toast.makeText(this@AddressActivity, "Addresses fetched!", Toast.LENGTH_SHORT).show()
}
}
Notice the the addresses with 2 IDs (they got fetched in reverse order)
I am trying to convert this into an ArrayList<Address> where Address is my model class. How do I do that?
