vendredi 25 juin 2021

How to notify other screen on like button click android

Let's say I'm working on a social media app like facebook. We can see post on feed page and by clicking the any post that post is visible in a post view screen. If I press like button on the post view screen and go back, I can see in the feed, like has been updated. How to achieve this, let's say my same post is present at various places I want to update respective post everywhere when like is clicked anywhere in that post. I want to implement like button, I'm thinking of observer pattern but I'm little bit confused when it comes to implementation. Can anyone share some reference? How you guys are doing it?

Aucun commentaire:

Enregistrer un commentaire