Design + Code an Android App from Scratch
Scrounge up some loose change to become a pro member, or login to your account to view this lesson.
Alright, join now. Or login to your account if you're already a pro member.This video shows how to update data contained in the Android Realm database. Inside our DialogFragment subclass that lets the person mark an item as complete, we use the realm instance to begin a transaction, use a setter method to update the status of an item as complete and commit the transaction. Don’t forget to call notifyDataSetChanged method that lets you refresh the RecyclerView after you mark an item as complete so that we can display a different background for completed items.