java - What is the efficient way to load and cache multiple Bitmaps? -


in "drawable" folder have 4 background images of 1024 x 768 or something.

however, turns out have use bitmap.createscaledbitmap() , android device 2560 x 1504. means bitmap size of 2560 x 1504 required fill whole screen background, memory-consuming because bitmap of impressive size.

for reason, need cache 4 bitmaps program can instantly switch new background when press button. means facing huge memory problems now. there way optimize it?

p.s: using imageview class display images. images files in "drawable" folder not bmp files.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -