Hello, My application includes a drawing feature and I would like the add the ability to "undo". The undo feature currently in place simply loads the bitmap from the last saved file, so no matter how many changes they make to their drawing "undo" will revert it back to the way it was before any changes were made.
What I want to do now is make it more like the "undo" feature we are used to in modern applications, so that it does not go back to the way the file was when we first opened it, rather it goes back in various steps during our editing (which can be quite numerous). My idea is to save the current bitmap in a linked list after every occurrence of finger down, finger up. Thus every time the user lifts their finger from the screen the bitmap will be added to the linked list. Then of course when "undo" is selected the bitmap at the top of the stack will be loaded. The only problem is if the user makes 20, 30, 40+ changes to their drawing that is a lot of bitmaps to keep references to, am I right? I see out of memory errors coming. Any ideas for alternatives? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en