Sunday, February 27, 2011

[android-developers] The best way to store data for animation

I'm making simple animation for my app, just series of many png files
(about 700). At one moment there are only 20 bitmaps in memory.
Now all .png files stored in assets. What is the best way to store
such data?
1) load all files to byte[] arrays and them dynamically decode and
recycle bitmaps. The fastest solution but it requires a lot of memory
(about 2mb for 700 images)
2) load all files and save to internal storage.
3) load and decode all files and save them as bitmaps to internal
storage
4) same as above but use external storage
5) ...other ways
I need the fastest solution with low memory usage. Have any ideas?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment