I am implementing an undo/redo feature. I am following the commank pattern. I want the undo/redo to work even after I restart the application.
Currently, I am passing the fragment to update the view in the command itself. I am storing the command manager class which has list of undo/redo stacks using Xtream Serializer and restore the command manager when the app starts. But after restart I call undo(), it doesn't work.
I am supposed to ask for the view to update when undo() is called and not store it but I dont understand a way to it. Similarly storing just the information needed to undo and redo the command should be stored and the views to update should be asked at runtime. I don't know how to achieve this. Can someone please help?
Aucun commentaire:
Enregistrer un commentaire