Is there any possible way to put all the drawn objects into an array? This is just for a drawing game so it is possible to save all objects and load them back from this way.
Thanks if this is possible!
Is there any possible way to put all the drawn objects into an array?
Share
Take a look at
Pictureclass – http://developer.android.com/reference/android/graphics/Picture.htmlAfter it’s being attached to the canvas, it records all drawing operations and stores it.
After you can either draw all of them on another canvas, or store/transfer the Picture to make it on another device or later.
UPD: something like this
Now you’ll be able to restore this rectangle from file and draw it on any another canvas.
So generally you can wrap you user’s drawing through this class and it wil store all user drawing operations.
Good luck