Slide 20
Slide 20 text
Quotes app
db.collection("quotes")
.get()
.addOnCompleteListener { task ->
if (task.isSuccessful) {
for (document in task.result!!) {
quotesList.add( Quote(document.id,document["quote"].toString(), document["author"].toString()))
}
initRecyclerView(quotesList) //method to initialize recyclerview
} else {
Log.w("QUOTE_ERROR_TAG", "Error getting documents.", task.exception)
}
}
20