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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -